Action when a tag is added
Hello,
We would like to create an action when a specific tag is added to an issue. What is the best way to do that ?
Ex : tag.Released.isAdded { //Do something }
Thanks in advance
Regards
Please sign in to leave a comment.
Hello,
You can check the following:
Besides that, describe Tag in requirements:
Hello,
Nevermind I found a way to do it.
Hope it can helps others.
Hello,
ctx.issue.tags.added.isNotEmpty() only works with normal tags, and when a Star tag is added, this condition does not work.
How to track a Star tag?
Anastasia Bartasheva
Hi Viacheslav Bachynskyi,
ctx.issue.tags.added.isNotEmpty()
should work for the Star tag as well. In particular, the following condition determines whether any new watchers were added:Can you please share the full workflow code from your side and describe the issue in more detail, how exactly
ctx.issue.tags.added.isNotEmpty()
doesn't work (whether it returnsfalse
or something else happens)?Hi Julia Bernikova
Here is the code:
When I add someone as an Assignee for the Issue, they are added to the Watchers list. At this moment, the Issue gets the ‘Star’ tag and the workflow should be triggered. But it doesn't work.
Hi Viacheslav Bachynskyi,
Thanks for explaining the scenario further.
ctx.issue.tags.added.isNotEmpty()
indeed only catches explicit tag addition, i.e. when a user manually clicks the “Star” icon within the issue. However, there's no way to detect it from a workflow if it's set implicitly as a result of changing the issue assignee. This ensures that the “Star” tag behavior configured by the user in their profile settings remains unaffected.In your case, a more fitting solution would be catching the assignee change and making sure the issue is visible to them:
Ok, thanks!