I have an issuetype called Acquisition which is the portfolio parent of an Epic. When this acquisition issue is created, I need to append the summary of this issue to all EPICS and Tasks that are created along with it (using automation).
I was able to do that by recursively searching all the epics/tasks and updating their summary using {{triggerIssue.summary}} "some pre determined text for each epic/task"
Now the client wants that if the acquisition summary is changed, then the previous summary which is part of each Epic/Tasks summary should be replaced with the new summary from the acquisition issue type.
I used the below but it is giving me an error indicating smartvalue cannot be derived. I am getting each epic/task recursively and trying to use the below to update summary on each
{{issue.summary.replace("{{fieldChange.fromString}}", "{{fieldChange.toString}}")}}
My thought was this would look for the parent's previous summary (fromString) replace it with new summary (toString) and then update the epic/task summary
If I test this with hardcoded values it works. Also if I update the epic/task summary directly with fieldChange.fromString or toString I am getting the right values
So seems to me like either I am using some wrong syntax OR its not possible to use smartvalues inside a replace (or other text functions)
Would like to know either way
Appreciate any help
Thanks
Balu
Community moderators have prevented the ability to post new answers.
I had requests like this before and it's a nightmare to be updating summaries of issues. Automation for jira will not work, you will need something like scriptrunner or powerscripts.
At the end, I resolved this issue with hierarchical reporting tools such as structure or eazybi. The main concern was that people wanted to see where tickets belong to and the hierarchy views helped.
I hope this helps.
For anyone looking for this answer and stumbling upon this post, I was able to get this to work by not using the curly braces within the replace function. So just use this: {{issue.summary.replace(fieldChange.fromString,fieldChange.toString)}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This topic has been locked because the thread has become a bit dated. If you’d like to keep the conversation going or have additional questions, we encourage you to start a new topic. You can read more about necro posting (“raising threads from the dead”) in our Community Guidelines .
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
{{fieldChange}} is relative to whatever field(s) changed and caused the trigger to fire, and so the ambiguity could be the problem. Perhaps try using {{changelog.summary}} instead.
And adding to what @Fabian Lim noted, tweaking the summary may be problematic and brittle as a solution. Instead consider if explicit custom fields to contain the information are better.
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Bill Sheboy Hi Bill, thanks for the response. It does seem to recognize fieldchange correctly if not used within the replace. Like if I set the summary directly to fieldChange.fromString or fieldChange.toString, it seems to work fine and sets them to the parent value. It just seems like these smart values cannot be used in the replace function.
I tried another test where I used triggerIssue.summary inside the replace and that failed too.
Anyways Ill use changelog.summary and see if that works.
Appreciate your response
Thanks
Balu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.