Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automation help - Find and delete specific text from custom text field

siond
Contributor
November 9, 2021

I have a custom field "Account" and some data has been placed there which I now want to remove in bulk... example..

 

Bookings - Mid 0123X000AAAAANQAY

 

The field type is 'Text'

 

How can I use Jira automations to seek out '0123X000AAAAANQAY' and replace with '' (nothing/delete it). I want to keep all other text in that field in tact.

 

So 'Bookings - Mid 0123X000AAAAANQAY' should become 'Bookings - Mid'

 

Thanks in advance!

1 answer

1 accepted

1 vote
Answer accepted
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 10, 2021
siond
Contributor
November 10, 2021

Thanks Bill! It worked!

 

For anyone else wondering the same here was my solution. I used the edit issue action and pasted in the replace smart value...

 

2021-11-10_15-41-13.jpg

Like Bill Sheboy likes this
Samuel Francis January 16, 2023

Good evening!

I am needing to replace the following information within the description

[{"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference","Id":8,"Value":"Florida"}

and only display Florida

I have used the {{issue.description.remove and also 

                           {{issue.description.replace, 

 

I have only been able to remove 

#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 16, 2023

Hi @Samuel Francis 

What else is in your description, or is this the only text and you want it to only return the state name?

If there is more text...there are quite a few non-alphanumeric characters in your string, and so you will need to use a regular expression (regex) to remove them and keep only the state name (and any other description text).  In addition some of those characters are reserved for regex and so you will need to escape them in the search.

Please take a look at the linked documentation sources above, and their links to the regex formatting to get started.

Kind regards,
Bill

Samuel Francis January 16, 2023

Hi Bill,

Thanks for the quick response.  The following information is the only info I would like to remove with automation after the issue is created.   

[{"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference","Id":8,"Value":

Kind Regards,

Sam

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 17, 2023

Yes, I understood that was what you are trying to do.  Please try using replaceAll() with a regular expression.  You may need to experiment a bit as some of the characters in your complex string are reserved, like quotation mark, and will need to be escaped such as with \"

Sharla_Campbell February 8, 2024

Hi Samuel,

I have the same issue...were you able to work out how to remove the text?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events