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

Taber Loveless
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 15, 2013

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

0 votes
JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 15, 2013

Did you try the script?

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

0 votes
Taber Loveless
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 15, 2013

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

0 votes
JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 15, 2013

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.

Taber Loveless
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 15, 2013

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.

JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 15, 2013

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.

Taber Loveless
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 15, 2013

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.

Taber Loveless
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 15, 2013

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"?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events