How do I configure scriptrunner in workflow postfunction?

Dante Lombardi June 30, 2015

How do I configure custom script (post function in a workflow)based on certain field values inputted and/or a keyword in the summary of the issue?

For example, if the issue summary has 'site catalyst' in the title, i want to automatically then assign it to a different user.

6 answers

0 votes
Dante Lombardi July 15, 2015

that worked!!! also one more question...how do i put and/or in the summary? like, catalyst and/or clicktale?

0 votes
Dante Lombardi July 14, 2015

as you can see it is blank below even after i put it in.

jira2.PNG

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 14, 2015

did you publish the workflow? If you did, try putting that just before step 5.

0 votes
Dante Lombardi July 14, 2015

looks like the screenshot below:jira.PNG

0 votes
Dante Lombardi July 14, 2015

also, the script is not working for my workflow. sad

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 14, 2015

can you give details - what's in the logs?

0 votes
Dante Lombardi July 13, 2015

what do i put in the scrip file? (Path to the script accessible on the server)

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.
June 30, 2015

something like:

if (issue.summary.contains("site catalyst")) {
    issue.setAssigneeId("someuser")
}

if you have that as the first post-function it should work.

Dante Lombardi July 8, 2015

what do i put in the scrip file? (Path to the script accessible on the server)

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 14, 2015

you can just paste it in to the script field.

Suggest an answer

Log in or Sign up to answer