I am using Automation for Jira to set the value of a field based on extracting a value from the Description. In my case the Description will contain multiple lines with the relevant ones as in the following example...
Detailed Order
Supplier This Supplier
Supplier That Supplier
Ship to Some Address
Supplier Order
The value I want is "This Supplier" and I am using the following expression to attempt to extract it.
{{issue.description.split("\n").match("Supplier (.*)").first}}
Unfortunately I always get "That Supplier".
Any ideas on the correct way to do this?
I tried your example in our Jira Server instance, and it seemed to work fine.
I updated the Description of an existing issue:
I used the smart value expression you listed in a Log Action:
And I manually invoked the rule on that issue. The result:
Thanks for confirming this should work. I will check to see if there's something else in the Description (it's actually much larger than my snippet) that's possibly impacting this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Got this working. Discovered that the spacing between the "Supplier" and the following value wasn't always a single space. So modified the match patten to "Supplier\s+(.*)" and it finds the correct occurrence.
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.