Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,368,635
Community Members
 
Community Events
168
Community Groups

Append a label to issue in post-function

Would like to add a transition that when the issue uses it a label is appended in the labels field. ie Issue is moved back to in progress and the label 'rework' is added. Never tried Script-runner however if that is the only way to do this happy to give it a try. Many thanks

3 answers

Hi @David Thomas ,

Welcome to the community!

Since you are on Jira Cloud, you have a few different options, ScriptRunner being just one of them. First you can try the Automation feature that's included for free with most Jira Cloud instances (go to Project Settings -> Automation). If you are ok with the automations not being part of the workflow configuration but living in that extra menu, this is a good approach.

Or you can choose a workflow app for Jira Cloud. In my biased opinion Cloud Workflows is a great and very flexible option, as it supports adding extra labels to the existing ones with easy post functions. Setting up a post function to add an additional label called 'foobar' would look like this:

Bildschirmfoto 2020-07-20 um 15.31.17.png

Hope that helps,
  Oliver 

Full disclosure: I work for Jodocus, the Marketplace Partner who created Cloud Workflows. Let me know if you need any help getting started, I'll be happy to help!

Hi David,

Thank you for your response.

I can confirm that to achieve your requirement of setting a label of rework when an issue is transitioned back to the In Progress status that you can use the Modify Issue post function provided by ScriptRunner for Jira Cloud.

You would do this by adding this post function onto the transition back to In Progress and would then set some code in the Additional Code box to set the label.

I can confirm that we have code examples named Set Labels and Update Label which you can click on below the code box to populate the box with the code that you need to set a label or to update existing labels.

I hope this helps.

Regards,

Kristian

0 votes
John Funk Community Leader Aug 13, 2020

Hi David - Welcome to the Atlassian Community!

You might also consider Automation For Jira - it's a free tool as a part of Jira Cloud now. A little more information:

There are two types of automation:

  • Global: In the Free version, you get 100 executions per product, per month
  • Project: In all versions, you get unlimited executions per month

Automation Basics: https://www.atlassian.com/software/jira/guides/expand-jira/automation

You can do this via global rules to apply to all projects also. You'll need to be a Jira Admin/Site Admin, go to Jira Settings > System > Automation Rules (left-hand menu).

For more on using Automation For Jira see these help pages.

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events