How do I use automations to add labels on a specific transition

BrentBot_
Contributor
March 7, 2022

I have review loops on different status groups which consists of multiple transitions to a single status

 

example. I need a label afixed when the transition l/f rejected is selected and then the label removed and a new one added when the l/f approved is selected

 

How can i create logic around the specific transitions Screen Shot 2022-03-07 at 10.46.44.png

3 answers

1 accepted

0 votes
Answer accepted
BrentBot_
Contributor
March 7, 2022

Hey guys - this is where I first went but there is no `labels` selection on the field update on post functions, at least not on cloud. Do you all see that?

Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 8, 2022

Ah, I forgot that you where on Cloud. In that case your only option is to use Scriptrunner to set the label in a post function. Have a look at this thread for the script needed, https://community.atlassian.com/t5/Jira-questions/Is-there-a-way-to-automatically-add-a-label-to-an-issue-when-it/qaq-p/1054492. The thread mention that you can use automation, but that option only allows you to set the label based on the status, not the actual transition, since that happens before the automation tiggers.

Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 8, 2022

I just thought of a possible workaround. You could use just a generic transition and then on the transition screen have to user select which transition it is. It may not be ideal, but you could then use post function to clear that field when transitioning out form the destination status.

BrentBot_
Contributor
March 11, 2022

Thank you @Mikael Sandberg I will play with these options. Its a bummer that we cant execute transitions via automations

1 vote
Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 7, 2022

Automation doesn't use the transition, it is just using the status that you transition to. So in you case you want to look at using post functions on the transition to set/remove your labels.

0 votes
Peter DeWitt
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 7, 2022

@BrentBot_ Like, @Mikael Sandberg said, you will need to add this functionality to the workflow transition.

This is the Post-Function for Company Managed Worflows:

2022-03-07_13-45-27.png

This is the Post-Function for Team Managed Workflows:

2022-03-07_13-49-05.png

-pjd

BrentBot_
Contributor
March 8, 2022

@Peter DeWitt did you see my note above that i do not see labels as an option to update that field?

Like # people like this

Suggest an answer

Log in or Sign up to answer