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?
Did you try the script?
It doesn't matter where you put, except it should be outside of the installation directory.
What is a recommended location in the jira installation tree that this file should be placed so it is maintained thru updates etc?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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"?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.