Jira Transition Post Function Script

Cynthia Fehr
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.
March 6, 2015

I would like to write a post function for the create transition.

I would like the post function to check the following:

If the Issue type is not bug and Description is Empty

set Description field to "Not Entered" and Priority field to "Priority 4"

Any ideas on how to do that?

6 answers

1 accepted

1 vote
Answer accepted
Guilherme Nogueira
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.
March 6, 2015

Try something like that:

 

if ((!issue.getIssueType().name.toString().equals("Bug")) and (issue.description == null)){
    
    issue.setDescription("Not Entered")
    issue.setPriorityId("4")
    
}

P.S. Use a custom scripted postfunction

0 votes
Alez_M August 31, 2023

Thanks! But can you tell me more about your services?

0 votes
Cynthia Fehr
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.
March 9, 2015

Thanks! 

 

0 votes
Guilherme Nogueira
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.
March 9, 2015

Does my answer worked for you?

0 votes
Cynthia Fehr
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.
March 6, 2015

I do have script runner

0 votes
Guilherme Nogueira
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.
March 6, 2015

Do you have scripts post function plugin (Script Runner) or Misk Workflow postfuncions?

Suggest an answer

Log in or Sign up to answer