I am using a System Disposition issue type and when that issue is moved to a status of complete AND the field "unit" is "OCIO" I want to automate the creation of a new issue (a new issue type, as well..."System Decommission") and I want to automatically assign it to someone and link it to the one I just closed out.....BUT I know NOTHING about coding nor ScriptRunner....except when I went to the Atlassian Summit, everyone said it was the Holy Grail. Can someone assist???
Alyssa,
You can start by the docs: https://scriptrunner.adaptavist.com/latest/jira/quickstart.html
they are complete and comprehensive with a lot of examples
You can achieve what you want with an script listener or post function
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Let us know if you have any trouble!
The guys from adaptavist are answering questions on the community all the time and you have dedicated section to post specific questions:
https://community.atlassian.com/t5/Adaptavist/ct-p/adaptavist
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alyssa,
I am looking to do something very similar. Have you been able to get this to work?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Jeanne-
Hello! YES! With the help of one of our Developers, we were able to use Groovy to create automation within our post function.
Our code looks like this:
((Map) issue.fields.issuetype)?.name.trim() == 'System Disposition' && ((List)issue.fields.customfield_14403)?.collect { it.value }?.any { it == 'OCIO' }&& ((List)issue.fields.customfield_13601)?.collect { it.value }?.any { it == 'Retire' || it == 'Replace with New System (Not WD)' } && ((Map) issue.fields.status)?.name == 'Done'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Alyssa,
Thank you so much for sharing the code.
If I understand this correctly, this code determines whether or not an issue gets created (it needs to meet all of the parameters). Is there a post function to actually create the issue? Are you setting default field values, or does the actual Create Issue screen pop up and users fill in the information?
Jeanne
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Jeanne if I am understanding your questions correctly, we have put this command with the post function of the "DONE" status of our issue type. As seen below:
It must be placed under the SET ISSUE STATUS TO LINKED STATUS OF THE DESTINATION WORKFLOW STEP in order for the automation to work.....so after I publish this workflow and I mark one of my issues as DONE, a clone link automatically pops up on the view issue screen (but the create screen does not automatically pop up) and there is a cloned issue with a different issue type and specific assignee...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did you catch the news at Team ‘25? With Loom, Confluence, Atlassian Intelligence, & even Jira 👀, you won’t have to worry about taking meeting notes again… unless you want to. Join us to explore the beta & discover a new way to boost meeting productivity.
Register today!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.