Is there any way to set a label using post-function ?

Hello,

I would like to know if there is any way setting a label using post-function in a workflow ?

If someone have a Script i can run ?

 

Thanks

3 answers

0 vote

Hey Lior!

It seems that's possible by using the Script Runner plugin. On this answered question, the developer of the plugin himself (Jamie Echlin) has already suggested a script that would do just that. I haven't tested it myself, but judging by the structure of the code and the variables it uses, that should work just fine.

In order to add a script to be run as post-function, you'll just have to go to the transition where you'd like to have it executed and, on the Add post function screen, you should see Script Post-Function (only after installing Script Runner). Then just provide the path to the script (be aware that JIRA should have read/write permission on this location).

information By the way, you can take a look at the official documentation for Script Runner here

I will also tag your question with the label monitored by the Script Runner's developer, so he may help on this as well. wink

 

Cheers!

Joao

Thanks for the response!

 

I understand that for this kind of script i need access to JIRA folders?

I am the administrator but i use a hosting provider so i can't access JIRA folders in order to upload a file.

Where should i put the script ? under which file extension ?

 

Thanks

Unfortunately, as Script Runner does not accept direct input of script on the UI for post-fuctions, you'll have to contact your hosting provider and check for a way to access the folders. Usually, they should provide you SSH credentials to the server, so that you can just SCP it to there from your local computer.

I would add that Update issues is another post function that can add labels and many other things. It is a bit of overkill for just adding labels however wink. It is part of Update on Transition for JIRA.

@Bob Swift [Bob Swift Atlassian Add-ons] thanks for that smile

but for now i am looking for something free .. smile

 

Thanks again!

 

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Jira

Meet the AUG leaders of Northern Virginia

@Rachel Wright (Jira Genie), @Billy Poggi (AUG NOVA, DC), and @Dana Jansen (Confluence Queen) are just some of the folks that lead one of the world's most active Atlassian User Group (AUG)....

125 views 4 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you