MicrosoftPremier / VstsExtensions

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

How to add Artifact link for the created ticket itself? #94

Closed ghost closed 4 years ago

ghost commented 4 years ago

Create work item is working fine.

However, I'm trying to add Artifact link for the created work item itself.

image

There is no route to add. It always error out with the below error messages.

2020-05-18T07:38:17.7959268Z There was an error while linking the work items. 2020-05-18T07:38:17.7970229Z Artifact links must have a valid name specified. 2020-05-18T07:38:17.7975740Z Parameter name: workItemUpdates 2020-05-18T07:38:17.8009024Z Cannot read property 'length' of undefined 2020-05-18T07:38:17.8046308Z ##[error]Cannot read property 'length' of undefined

Basically, I'm trying to add the build link like in the below. image

ReneSchumacher commented 4 years ago

Hi @simoncho,

if I understand your request correctly you just want to link the created work item to the pipeline run in which it was created, right? There is an option for this in the task itself (see https://github.com/MicrosoftPremier/VstsExtensions/blob/master/CreateWorkItem/en-US/overview.md#user-content-associate).

Artifact links have a very special syntax and it is not possible to specify that in the task configuration. If you're missing any special type of linking, just let me know and I'll check if we can add it to the task.

René

ghost commented 4 years ago

I'm trying to do while "release" not in Build. So, that specific option ignored because of the below condition.

"This option only takes effect when the task is running as part of a build; it is ignored when running inside a release."

ReneSchumacher commented 4 years ago

Ah, I see. I'll check if we can quickly extend that option to work for release pipelines as well.

ghost commented 4 years ago

Perfect. Thank you for the considering.

ReneSchumacher commented 4 years ago

Hey @simoncho,

I just released v1.8.0 of the extension that also allows linking to release environments so I'll close this issue now. If you have any trouble using the updated version, just let us know.

Happy building, René