Groovy script doesn't work on JIRA 6.0.8

Hi all!

Simple groovy script on "Create Issue" with one line code doesn't work.

issue.description += "Test from Groovy"

OR

issue.summary += "Test from Groovy"

Log file is empty.

Any ideas why?

Thanks,

Sergey

2 answers

1 accepted

1 votes
Henning Tietgens Community Champion Oct 21, 2013

If the changes should be done after the issue is created you have to add a

issue.store()

after changing the summary. Additionally you have to update the index via the IssueIndexManager.reIndex() method.

Henning Tietgens Community Champion Oct 21, 2013

Maybe you could try without a reindex if you place the post function before the reindex and you are sure you're using the original issue object (like you do in your simple script in you question).

Henning Tietgens, thanks!

0 votes
Henning Tietgens Community Champion Oct 21, 2013

Try move the postfunction to the first position of post functions.

Henning Tietgens Community Champion Oct 21, 2013

Because "Create the issue originally" creates and saves the issue to the database and the changes to the issue object should take place before this function.

Henning Tietgens, it's necessary to update description after issue creation. Is there any way to update issue's description after originally issue is created?

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,770 views 11 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot