Hi and good day to all!
Im trying to use this smart value to remove a backslash {{issue.customfield_10135.remove("\")}}
1) I bring from SF the last chatter (custom field rich text) into a custom field(paragraph text).
2) this is the result. Since the field is rich text it comes with a set of backslashes that I want to remove.
3) This is the automation to remove the backslash
4) so I'm using the .remove smart value. but it won't work. it doesn't remove the backslash. and I get this error:
Any ideas on how to do it are appreciated!
Thanks!!
Hi @Aaron Pavez
The backslash is the escape character so you need to double it for use in the expression. Please try this:
{{issue.myField.remove("\\")}}
Kind regards,
Bill
Hi @Bill Sheboy
Tried that, but no luck, got some errors.
Failed to get value for customfield_10135.remove("\\"): {{customfield_10135.remove("\\")}}
Failed to get value for issue.customfield_10135.remove("\\"): {{issue.customfield_10135.remove("\\")}}
Thanks and Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That is curious...I just retested it and it worked for the Description field.
If you are trying to get the data from the last comment to save, perhaps try this:
{{issue.comments.last.body.remove("\\")}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Bill Sheboy May you please guide me on - How do we remove COMMA from {{sprint.goal}} field? I tried remove(",") and replaceAll(","," ") functions and also followed the tricks mentioned on some google links.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Somesh Laturia -- Welcome to the Atlassian Community!
First thing: this is a very old thread, and so I recommend creating a new question, perhaps linking back to this thread. That will ensure the maximum number of people see the question to offer suggestions.
When you post your question, remember to include images of the complete rule, the action where you are trying to remove the comma, and of the audit log details showing the rule execution. Those will provide context for the community to help.
Until we see your new question...what is the trigger / context for your rule?
When the trigger is sprint-related (e.g., Sprint Started), the smart value {{sprint}} only contains one value, and {{sprint.goal.remove(",")}} should work.
But if your rule is using issues with the smart value, such as with {{issue.sprint}} the value could be a list of sprints the issue has been in. This will result in any comma removal not working as you expected.
For example, let's assume an issue has been in these sprints with their associated goals:
This smart value expression would return the list of values removing the commas in the goal but not between the list items:
{{issue.sprint.goal.remove(",")}}
--returns this:
Here is the goal of the sprint, Sprint B's goal is here
Assuming you only wanted the goal for the current, active sprint, the list could be filtered by the state, and then remove the comma:
{{#issue.sprint}}{{#if(equals(state,"active"))}}{{goal.remove(",")}}{{/}}{{/}}
Kind regards,
Bill
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.