Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Removed custom field Lancado from WorkItem and dtos. New migration.
  • Loading branch information
DiegoGalante committed Jun 21, 2022
commit c07183fdf347932158b29caa6feee28eb26eedea
3 changes: 0 additions & 3 deletions AzureDevopsTracker/DTOs/Fields.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,6 @@ public class Fields
[JsonProperty("Microsoft.VSTS.Common.Activity")]
public string Activity { get; set; }

[JsonProperty("Custom.01f51eeb-416d-49b1-b7f9-b92f3a675de1")]
public string Lancado { get; set; }

[JsonProperty("Custom.ChangeLogDescription")]
public string ChangeLogDescription { get; set; }
}
Expand Down
5 changes: 1 addition & 4 deletions AzureDevopsTracker/Entities/WorkItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ public class WorkItem : Entity
public string StoryPoints { get; private set; }
public string WorkItemParentId { get; private set; }
public string Activity { get; private set; }
public string Lancado { get; private set; }
public bool Deleted { get; private set; }

public ChangeLogItem ChangeLogItem { get; private set; }
Expand Down Expand Up @@ -52,8 +51,7 @@ public void Update(string title,
string effort,
string storyPoint,
string originalEstimate,
string activity,
string lancado)
string activity)
{
TeamProject = teamProject;
AreaPath = areaPath;
Expand All @@ -68,7 +66,6 @@ public void Update(string title,
StoryPoints = storyPoint;
OriginalEstimate = originalEstimate;
Activity = activity;
Lancado = lancado;
}

public void Restore()
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ public partial class CustomFields : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Lancado",
schema: DataBaseConfig.SchemaName,
table: "WorkItems");

migrationBuilder.CreateTable(
name: "CustomFields",
schema: DataBaseConfig.SchemaName,
Expand Down Expand Up @@ -34,6 +39,13 @@ protected override void Down(MigrationBuilder migrationBuilder)
migrationBuilder.DropTable(
name: "CustomFields",
schema: DataBaseConfig.SchemaName);

migrationBuilder.AddColumn<string>(
name: "Lancado",
schema: DataBaseConfig.SchemaName,
table: "WorkItems",
type: "varchar(200)",
nullable: true);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,6 @@ protected override void BuildModel(ModelBuilder modelBuilder)
b.Property<string>("IterationPath")
.HasColumnType("varchar(200)");

b.Property<string>("Lancado")
.HasColumnType("varchar(200)");

b.Property<string>("OriginalEstimate")
.HasColumnType("varchar(200)");

Expand Down
12 changes: 4 additions & 8 deletions AzureDevopsTracker/Services/AzureDevopsTrackerService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ public async Task Create(CreateWorkItemDTO create, bool addWorkItemChange = true
create.Resource.Fields.Effort,
create.Resource.Fields.StoryPoints,
create.Resource.Fields.OriginalEstimate,
create.Resource.Fields.Activity,
create.Resource.Fields.Lancado);
create.Resource.Fields.Activity);

if (addWorkItemChange)
AddWorkItemChange(workItem, create);
Expand Down Expand Up @@ -101,8 +100,7 @@ public async Task Update(UpdatedWorkItemDTO update)
update.Resource.Revision.Fields.Effort,
update.Resource.Revision.Fields.StoryPoints,
update.Resource.Revision.Fields.OriginalEstimate,
update.Resource.Revision.Fields.Activity,
update.Resource.Revision.Fields.Lancado);
update.Resource.Revision.Fields.Activity);

AddWorkItemChange(workItem, update);

Expand Down Expand Up @@ -137,8 +135,7 @@ public async Task Delete(DeleteWorkItemDTO delete)
delete.Resource.Fields.Effort,
delete.Resource.Fields.StoryPoints,
delete.Resource.Fields.OriginalEstimate,
delete.Resource.Fields.Activity,
delete.Resource.Fields.Lancado);
delete.Resource.Fields.Activity);

AddCustomFields(workItem);

Expand Down Expand Up @@ -169,8 +166,7 @@ public async Task Restore(RestoreWorkItemDTO restore)
restore.Resource.Fields.Effort,
restore.Resource.Fields.StoryPoints,
restore.Resource.Fields.OriginalEstimate,
restore.Resource.Fields.Activity,
restore.Resource.Fields.Lancado);
restore.Resource.Fields.Activity);

AddCustomFields(workItem);

Expand Down