Hello, I'm trying to use Jira Automation to quickly set the story point value of a task by grabbing a numeric value from the Summary field through a regular expression. Does anyone have examples of how to do something like that?
Example:
Creating a Jira task with summary "Deploy code to Production :3:" would trigger this rule, set the Story Point numeric field to 3, and then remove the " :3:" from the Summary field text.
This is what I have so far (see screenshot below), but I'm not sure if I'm doing it right and also next steps of how to put that numeric value into some sort of variable and set the Story Point field to that variable? Lastly, ideally I would then remove the " :3:" from the end of the Summary field text.
The only documentation Jira links me to for regular expressions is this:
https://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html
Any additional documentation or similar examples would be appreciated - thank you!
I managed to figure this out and for anyone with similar needs, here's each step of my new rule (with regex text included to help copy/paste):
Regex to get the Story Point numeric value from the Summary text:
{{issue.summary.match("\s:(\d+?):$")}}
Regex to get the Summary text without the Story Point " :X:" appended to the end:
{{issue.summary.match("^(.*)\s:\d+?:$")}}
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.