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?

9 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
Damon March 25, 2021

Please write which script worked like that? Because not a single answer has helped me yet. I will turn to web development services for help to automate business processes, but I would like to figure it out myself for future manipulations.

0 votes
Harris Reid January 29, 2021

I guess you might find the answer here

or even here

0 votes
OctaviaMays January 4, 2021

Scripts help a site to perform tasks that a plugin can do but they create less overhead on the system. People who work on telemedicine platform development will know exactly what overhead can do to a system. I have seen motherboards fry because of this extra load.

Alez_M August 31, 2023

thanks for this

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