[Groovy] Set issue summary in post-function on create

DupontD August 5, 2014

Hello,

I am trying to generate the Summary field at "Create Issue" transition with a Groovy script.

The script is a post function before the step "Creates the issue originally." and works fine.

But after creating an issue, the reporter gets a message "Issue <Key> - <Summary> has been successfully created." and this message shows the old non generated summary.

How can i get the new generated Summary in this message ?

Thanks

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 5, 2014

I don't think you can - the message is generated from what the users have entered on-screen, not read from the issue after it is created.

DupontD August 5, 2014

Argh ok ... so Jira creates the issue, gets the key but shows the on-screen summary instead of getting the on-base field ?

Too bad ...

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 5, 2014

It's not expecting you to destroy the information the users entered in the field, and it's more efficient to simply keep what was entered than write it to the database and then go and re-read it.

DupontD August 5, 2014

Ok, Thank you.

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.
August 6, 2014

A better option might be to pre-fill the summary using the behaviours plugin and make it read-only.

Then you will get the right message, and the fact the user's summary has been wiped won't be surprising/annoying.

TAGS
AUG Leaders

Atlassian Community Events