Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Setting Summary does not change issues listing summary Edited

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("\\[|\\]","")
issue.setSummary(mSummary)

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.

EDIT:

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.

EDIT2:

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".

Example:

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"

EDIT3:

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

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
DEPLOYMENT TYPE
SERVER
TAGS
Community showcase
Published in Marketplace Apps & Integrations

Jira issue check and more advanced commit verifications for Bitbucket DC

Pre-receive hooks that verify the Git commit message, the modified files, and implement similar code change controls used to be requirements of large enterprises working in regulated industries only....

31 views 0 2
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you