Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Setting Summary does not change issues listing summary


I have a scriptrunner post function that sets an issue's summary to values provided in the create stage. Its a simple issue.setSummary(collection of values toString()).

Post Function Code:

String mSummary = issue.getSummary()
//insight asset manager object
def customObject = customFieldManager.getCustomFieldObject(ID)
Object customObjectValue = issue.getCustomFieldValue(customObject)
mSummary = customObjectValue.toString().replaceAll("\\[|\\]","")

When I open the Open Issues, all issues do not show what I've set the summaries by code, instead it shows the default summary "REPLACED_ON_CREATE".

However when if I click on an issue in the list the list object changes to show the summary value I've set in code and when I open the issue it shows correct values I've set by code.


If I refresh the Open Issues list, the summaries go back  to the default "REPLACED_ON_CREATE" value until I click on them again and they update to the values I set in code.


Additionally, I cannot search on the values I've set for the summary in code. My search results ONLY return on the default value "REPLACED_ON_CREATE".


New issue -> default summary is "REPLACED_ON_CREATE" -> post function change to "Test Issue 1 catagory 1" -> Issue shows in list as KEY-### REPLACED_ON_CREATE -> click on issue and now shows as KEY-### "Test Issue 1 catagory 1" -> When searching no results show for "test" or "issue" or "catagory" or "Test Issue 1 catagory 1", only "REPLACED_ON_CREATE"


Jira Workflow Toolbox's "copy a parsed text to a field" post function resolved my issue. I still don't know why the above code would not work within scriptrunner.

1 answer

1 accepted

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.
Dec 15, 2020

I suspect the reason Scriptrunner did not appear to work is that you placed the post-function after the "reindex the issue" post-function, so the index (and heance searching and reporting) was holding the old value.

I had the script before the re-index but after the create step in the post function. I believe part of that was earlier versions of the code didn't work well until it was later in the steps. The cleaned up code works at as intended now if I place it before the create step.

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events