Skip to content

Commit

Permalink
Update to move Product to field.... +semver: minor
Browse files Browse the repository at this point in the history
  • Loading branch information
MrHinsh committed Jun 28, 2024
1 parent ce074a7 commit 14dc184
Show file tree
Hide file tree
Showing 3 changed files with 2,604 additions and 7 deletions.
11 changes: 4 additions & 7 deletions ABB.WorkItemClone.ConsoleUI/Commands/WorkItemCloneCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,10 @@ public override int Execute(CommandContext context, WorkItemCloneCommandSettings
itemAdd.ItemFromtemplate = templateItem;
itemAdd.ItemFromConfig = cWorkItem;

if (cWorkItem.fields.product != null)
{
itemAdd.Operations.Add(new FieldOperation() { op = "add", path = "/fields/System.Title", value = $"[{cWorkItem.fields.product}] {cWorkItem.fields.title}" });
} else
{
itemAdd.Operations.Add(new FieldOperation() { op = "add", path = "/fields/System.Title", value = $"{cWorkItem.fields.title}" });
}

itemAdd.Operations.Add(new FieldOperation() { op = "add", path = "/fields/System.Title", value = $"{cWorkItem.fields.title}" });
itemAdd.Operations.Add(new FieldOperation() { op = "add", path = "/fields/Custom.Product", value = $"{cWorkItem.fields.product}" });

if (templateItem != null)
{
itemAdd.Operations.Add(new FieldOperation() { op = "add", path = "/fields/System.Description", value = templateItem.fields.SystemDescription });
Expand Down
Loading

0 comments on commit 14dc184

Please sign in to comment.