How to create post workflow function to update field of linked issue?

How do I create a Post Workflow script to set a Multi Checkbox Field to specific value IFF issueLink = blocker?

Can you provide some instruction on how I could modify the 'add comment' post workflow script (which provides similar behavior) to perform allow this capability?

3 answers

This widget could not be displayed.

Put the following code in a file on your server:

https://gist.github.com/jechlin/6003129

Adjust the script where I have marked.

In your workflow, add new script post-function. Instead of using a built-in script give the path to this file.

This should be the FIRST post-function in the list.

I am trying the script now... just didnt know where on the server I should place it. I was assuming it would need to be in the install dir somewhere (and would prefer that as its less likely to get 'lost') but will do as you instructed.

It's best to be outside, so it survives an upgrade. Personally I have everything in a directory "../scripts" which is relative to the working directory.

Its not working. Im not sure if its because the field Im trying to change is the builtin 'Flagged' or if its not detecting that the issue being transitioned is a 'Blocker'. I cant find anything was writtent to the log (error/info notice) either.

Ok, so I was able to at least get the script to write a 'debug' line to the StdOut log. I suspect its not detecting the issue is a 'blocker' for some reason (so its not getting into the If{}...

Ill poke around and see what I can find. If you have any suggestions I would appreciate them.

Thank you so much for getting me started on this, there are many thing I want to use similar functionality for :)

Have you considered allowing the saving and linking of a script from the "script console"?

This widget could not be displayed.

What is a recommended location in the jira installation tree that this file should be placed so it is maintained thru updates etc?

This widget could not be displayed.

Did you try the script?

It doesn't matter where you put, except it should be outside of the installation directory.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Aug 22, 2018 in Marketplace Apps

How a Marketplace app tech team is achieving gender diversity

Hello! My name is Genevieve Blanch, and I'm the Marketing Manager at RefinedWiki, creators of apps to give teams the tools to customize Atlassian platforms. Currently, 44% of the tech team at Re...

475 views 3 17
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