I am trying to get 7 fields from issue description and add them to custom fields:
I have built a test rule to get HIS from Application::"HIS" and add it to Labels:
Unfortunately I am getting the below error:
I guess to get only "HIS", regex should be: Application::"(.*)"
I would appreciate any suggestions on this case.
Hi @Mateusz Bajorek -- Welcome to the Atlassian Community!
Your update with the group parenthesis is correct, and you may escape the quotation marks if you do not want those in the result:
{{issue.description.match("Application::\"(.*)\"")}}
Also...do you expect any linefeeds / carriage returns on the description? If so, it does not handle those well; consider replacing / removing those before the match() call.
Kind regards,
Bill
Hi @Bill Sheboy
This is exactly what I was looking for. Thank You so much!
Let me create custom fields to check if I can add all the info.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Before you do that...
You can quickly test by using match function calls and only writing to the audit log. That will save time in getting the correct regular expressions before trying to set the field values.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Mateusz Bajorek
Obviously your regex has issues. Please update your top post and give an example text from where you need to extract these 7 labels so community can help.
Because what you have shared is not what you want so any solution given for this is not going to work when you start expanding your requirement. Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
sure, here it is:
I think I will create text custom fields for each of this section.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please share actual sample text so users can try it and update your original post of this thread so others can take a look as well.
Also, what is your end goal... you say you want to update labels field but you have sentences. You cannot have spaces in your labels right?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I will have to get 7 labels in total from one issue description.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.