Skip to content

Commit c07183f

Browse files
committed
Removed custom field Lancado from WorkItem and dtos. New migration.
1 parent a44780b commit c07183f

File tree

6 files changed

+18
-22
lines changed

6 files changed

+18
-22
lines changed

AzureDevopsTracker/DTOs/Fields.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,6 @@ public class Fields
7474
[JsonProperty("Microsoft.VSTS.Common.Activity")]
7575
public string Activity { get; set; }
7676

77-
[JsonProperty("Custom.01f51eeb-416d-49b1-b7f9-b92f3a675de1")]
78-
public string Lancado { get; set; }
79-
8077
[JsonProperty("Custom.ChangeLogDescription")]
8178
public string ChangeLogDescription { get; set; }
8279
}

AzureDevopsTracker/Entities/WorkItem.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ public class WorkItem : Entity
2020
public string StoryPoints { get; private set; }
2121
public string WorkItemParentId { get; private set; }
2222
public string Activity { get; private set; }
23-
public string Lancado { get; private set; }
2423
public bool Deleted { get; private set; }
2524

2625
public ChangeLogItem ChangeLogItem { get; private set; }
@@ -52,8 +51,7 @@ public void Update(string title,
5251
string effort,
5352
string storyPoint,
5453
string originalEstimate,
55-
string activity,
56-
string lancado)
54+
string activity)
5755
{
5856
TeamProject = teamProject;
5957
AreaPath = areaPath;
@@ -68,7 +66,6 @@ public void Update(string title,
6866
StoryPoints = storyPoint;
6967
OriginalEstimate = originalEstimate;
7068
Activity = activity;
71-
Lancado = lancado;
7269
}
7370

7471
public void Restore()

AzureDevopsTracker/Migrations/20220621163011_CustomFields.Designer.cs renamed to AzureDevopsTracker/Migrations/20220621170433_CustomFields.Designer.cs

Lines changed: 1 addition & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

AzureDevopsTracker/Migrations/20220621163011_CustomFields.cs renamed to AzureDevopsTracker/Migrations/20220621170433_CustomFields.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ public partial class CustomFields : Migration
77
{
88
protected override void Up(MigrationBuilder migrationBuilder)
99
{
10+
migrationBuilder.DropColumn(
11+
name: "Lancado",
12+
schema: DataBaseConfig.SchemaName,
13+
table: "WorkItems");
14+
1015
migrationBuilder.CreateTable(
1116
name: "CustomFields",
1217
schema: DataBaseConfig.SchemaName,
@@ -34,6 +39,13 @@ protected override void Down(MigrationBuilder migrationBuilder)
3439
migrationBuilder.DropTable(
3540
name: "CustomFields",
3641
schema: DataBaseConfig.SchemaName);
42+
43+
migrationBuilder.AddColumn<string>(
44+
name: "Lancado",
45+
schema: DataBaseConfig.SchemaName,
46+
table: "WorkItems",
47+
type: "varchar(200)",
48+
nullable: true);
3749
}
3850
}
3951
}

AzureDevopsTracker/Migrations/AzureDevopsStateTrackerContextModelSnapshot.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,6 @@ protected override void BuildModel(ModelBuilder modelBuilder)
133133
b.Property<string>("IterationPath")
134134
.HasColumnType("varchar(200)");
135135

136-
b.Property<string>("Lancado")
137-
.HasColumnType("varchar(200)");
138-
139136
b.Property<string>("OriginalEstimate")
140137
.HasColumnType("varchar(200)");
141138

AzureDevopsTracker/Services/AzureDevopsTrackerService.cs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@ public async Task Create(CreateWorkItemDTO create, bool addWorkItemChange = true
5252
create.Resource.Fields.Effort,
5353
create.Resource.Fields.StoryPoints,
5454
create.Resource.Fields.OriginalEstimate,
55-
create.Resource.Fields.Activity,
56-
create.Resource.Fields.Lancado);
55+
create.Resource.Fields.Activity);
5756

5857
if (addWorkItemChange)
5958
AddWorkItemChange(workItem, create);
@@ -101,8 +100,7 @@ public async Task Update(UpdatedWorkItemDTO update)
101100
update.Resource.Revision.Fields.Effort,
102101
update.Resource.Revision.Fields.StoryPoints,
103102
update.Resource.Revision.Fields.OriginalEstimate,
104-
update.Resource.Revision.Fields.Activity,
105-
update.Resource.Revision.Fields.Lancado);
103+
update.Resource.Revision.Fields.Activity);
106104

107105
AddWorkItemChange(workItem, update);
108106

@@ -137,8 +135,7 @@ public async Task Delete(DeleteWorkItemDTO delete)
137135
delete.Resource.Fields.Effort,
138136
delete.Resource.Fields.StoryPoints,
139137
delete.Resource.Fields.OriginalEstimate,
140-
delete.Resource.Fields.Activity,
141-
delete.Resource.Fields.Lancado);
138+
delete.Resource.Fields.Activity);
142139

143140
AddCustomFields(workItem);
144141

@@ -169,8 +166,7 @@ public async Task Restore(RestoreWorkItemDTO restore)
169166
restore.Resource.Fields.Effort,
170167
restore.Resource.Fields.StoryPoints,
171168
restore.Resource.Fields.OriginalEstimate,
172-
restore.Resource.Fields.Activity,
173-
restore.Resource.Fields.Lancado);
169+
restore.Resource.Fields.Activity);
174170

175171
AddCustomFields(workItem);
176172

0 commit comments

Comments
 (0)