Hello,
Is it possible to match on data that is present on several rows in a text field?
Example:
Description field has the following data:
"Is it A or B?
B"
The Component "New Condition/Issue fields condition" seems to be only single lined and doesnt support multi line information?
Edit: (more information added)
I want to set a specific label to issues that has a certain value in the description field.
The problem for me is that the value im looking for is also presented in the description field from the form the user filled in so i cant match on only the word because thats already present in the form.
The description field looks like this:
"Is it A1 or B2?
B2
Have you tried C3 or D4?
D4"
The user in the above example has filled in "B2" and "D4" and i want to set the label on the issue based on that the user filled in "B2" in the issue.
I also dont want to edit the layout of the description, i want it to be formated the same way as it was then the issue was created.
Hi @N Holm -- Welcome to the Atlassian Community!
Do you care about any of the embedded newline characters in your search results?
If not, you can help the match() function by first splitting on newline. For example:
{{issue.description.split("\n").match(your search expression)}}
Kind regards,
Bill
Thanks for that additional information.
The challenge with this scenario is the description field needs to be stable enough to create a match() expression to check it.
Let's assume your description also contains the questions, as you show, and that each one always ends in a question mark. The first step of the parsing to could be to remove all lines which end in a question mark. Better still, if there is a prefix and suffix, that will help. For example:
Question: Is it A1 or B2?
B2
Question: Have you tried C3 or D4?
D4
That will improve the accuracy of removing the questions before checking for the answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you could replace all new lines with a control character and than match with a regex e.g
{{issue.description.replaceAll("(\n)","control_Character").replaceAll("(\s+NEWLINE)","NEWLINE").match("Startstring (.*)Endstring:").replaceAll("(NEWLINE)","\n")}}.
you may want to experiment with \r\n as well and the regex depending on what you want (e.g do you want the text or do you just want to check for specific string.
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.