Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add a tag when creating a work-item with az cli

I'd like to create a product backlog item with tag by using the az cli (devops).

Creating the PBI works fine (az boards work-item create --type 'product backlog item' --title 'my pbi' -d 'some desc' --area --iteration ). However, the cli does not offer something like a tag option.

Is there way to add a tag while creating the PBI, or by executing a subsequent az command?

like image 659
Malagueta Avatar asked Nov 02 '25 17:11

Malagueta


1 Answers

The Azure Docs show you can use the --fields flag when calling az boards work-item create this enables you to use any of the fields defined on your work item.

For tags this field is System.Tags so you can add that to your command like this

--fields "System.Tags=Foo"

If you want a list of tags pass them as a comma separated list:

--fields "System.Tags=Foo, Bar"

like image 99
Pete Philters Avatar answered Nov 05 '25 15:11

Pete Philters



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!