Hi,
I was looking for a way in automation using smart values to change the Summary field as follows:
Say the summary may be in the format below:
"X the actual text of my Summary X"
So basically I have: X<>the actual text of my Summary<>X
I would like to remove X<> and <>X from the summary.
Always the same blank (<>) , always the same character (X here but it could be any single character).
Thanks
Hi @Dd
Without seeing the specifics of your automation rule, I believe what you describe is possible using several different possible text functions: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-text-fields/
Perhaps review those ones for extracting substrings or using the match() function, and try this in your rule. I recommend initially writing the results to the audit log rather than updating the Summary until your rule works as expected.
Kind regards,
Bill
Hi Bill,
Thanks for the reply. I doubt match() will help (though I might be missing something.
Let me try and describe the situation exactly:
The summary of a ticket is always in the same format:
XY<actual summary>YX
I want my automation to change the summary to be just <actual summary>
So what I'm trying to do is remove XY from the beginning and YX from the end.
If I could use the length() attribute combined with the substring(int start, int end) attribute. combine them and extract something like
summary.substring(2, summary.lrngth()-2) and remove both XY and YX but that didn't work for me (though I might have dome something wrong...
BTW - how do u write results in the audit log?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
First, you may write to the audit log with the log action: https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Log-action
Next, from what you described, if the XY and YX text are fixed / in a known format, either the match() function or text functions would work.
For example with the text functions, you may chain them together:
{{issue.summary.substringAfter("XY").substringBeforeLast("YX")}}
With match, you could similarly write the expression to only return the value in the middle.
If you have not already done so, I recommend writing a rule to experiment, writing to the log and adjusting to meet the need.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.