I have this smart value that I am utilizing from the description field to extract the information between pieces of data in the description field in automation to populate a customized field in the Jira instance:
{{issue.description.substringBetween("Name: GMRCNT\","Host Name"}}
I can't get this work anyway possible. I've looked at the following links of documentation regarding smart value:
https://confluence.atlassian.com/sneaky/jiracorecloud/advanced-field-editing-json-996709925.html
https://support.atlassian.com/jira-software-cloud/docs/smart-values-text-fields/
And a few other kb articles. I have had all kinds of errors, but this is the last one It gives me:
Failed to get value for issue.description.substringBetween("Name: GMRCNT\","Host Name")
I utilized this same format substring in another automation rule by populating a field with a description and it works fine with no errors:
{{issue.description.substringBetween("Case # ","Subject:")}}
Both my fields are the same format and on the screens.
Any suggestions on what to try to get the information between 2 pieces of data in the Description jira field???
I wonder if the slash character is not being accepted in the search parser. Please try to remove that character to see if it works. If so, that would isolate the problem and then you could try to either escape the character or just use remove() after pulling out the substring.
Best regards,
Bill
I did remove the / and it still doesn't work. The unfortunate part is that I need the text right after the GMRCNT\
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
do you mean to extract the value with the / and then remove the /? Not sure what you me about escape the character
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi! Okay I did some quick tests, and found that the substringBetween() is parsing stuff following the \ as a prefix for a special character. If you change your search to use \\ in place of any \ it should work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Bill,
It kind of worked. I don't know how to solve the error that I got or remove the special characters in the field.
Here what the field displays as it has the > and a space before the user name:
Network Name: > nbrumbaugh
There is some kind of special character that I can't see in Jira. when I edit the field it just shows a space before nbrumbaugh
Here are my input lines to extract the user name from:
User Name: GMRCNT\nbrumbaugh
Host Name: DG47YY2-LT.gmrcnt.local Client Name: DG47YY2-LT
This is the error I am receiving in the audit log:
Issue was edited successfully, however some unexpected errors occurred -sd.request.update.request.type.error
Farther than I was though - Thank you! - I am assuming the \ is creating the special character. Any suggestions?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Nita, now that you have the value, please try adding a trim() after the extract. That should remove any leading/trailing whitespace or control characters in there.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nita,
Can you please share your audit log when the rule is triggered?
Regards,
Fabian
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.