MicrosoftPremier / VstsExtensions

Documentation and issue tracking for Microsoft Premier Services Visual Studio Team Services Extensions
MIT License
56 stars 14 forks source link

Create Work Item task, updateRules with Iteration Path @currentIteration #46

Closed jwikman closed 4 years ago

jwikman commented 4 years ago

I'm using the "Create Work Item" task for creating work items in my multistage yaml pipeline.

I'm using the preventDuplicates and updateDuplicates to update existing Work Item instead creating new ones. If I have a duplicate I want to update the Iteration Path to the current Iteration.

I'm using this for new Work Items, which works great:

    iterationPath: '$(WorkItemTeamID)@currentIteration'

But having @currentIteration in the updateRules fails

    updateRules: |
      State=New
      Iteration Path=$(WorkItemTeamID)@currentIteration

$(WorkItemTeamID) is a pipeline variabel set before this is run

The only clue I get about this is the debug message: `

[debug]TF401347: Invalid tree name given for work item 26413, field 'System.IterationPath'.

`

ReneSchumacher commented 4 years ago

Hi Johannes,

thanks for reporting this issue. We can reproduce it and already identified the bug in the code. For work item updates we simply forgot to resolve the correct iteration path from the special value {team ID}@currentIteration. Sorry for that. We'll fix the issue tomorrow and publish an updated version of the task. The update should be available tomorrow.

Thanks, René

jwikman commented 4 years ago

Thanks René,

That was fast! 👍

ReneSchumacher commented 4 years ago

Hi again,

we just published version 1.5.4 of the task that contains the fix, thus, I'm closing the issue. If the update still doesn't work for you or you run into other issues, please feel free to comment again, create a new issue or send us an email to PSGerExtSupport@microsoft.com.

Happy building! René

jwikman commented 4 years ago

@ReneSchumacher where can I see what version I have installed in our DevOps?

ReneSchumacher commented 4 years ago

Unfortunately, you can only see it in the task log. If you're running on Azure DevOps Services it will automatically update to the latest minor and patch version. For Azure DevOps Server you can look into the local marketplace (http://your-tfs/_gallery/manage). You'll see the version there and can update the extension to the latest version.

Edit: you can actually see the installed version on Azure DevOps Services as well. Go to Organization Settings, Extensions and click on the Create Work Item extension.

jwikman commented 4 years ago

Aah, there it was! (I'm on DevOps Services)

It's version 1.5.4, so I'll just give it a spin then.

jwikman commented 4 years ago

@ReneSchumacher I can confirm that this now works as expected.

Thanks a lot for fast action!