Forums

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

Remove part of a description when a certain label is added

Drew Nedderman
Contributor
March 5, 2018

I want to edit a description to remove some text when a certail label is added to an issue. Basically this:

  1. Issue Created in JSD
  2. Issue edited to have a certain label
  3. Issue Description edited automatically to remove a certain string of text

 

What is happening here is that one of our customers is creating issues via email that contain a URL to a large image file and it's intrusive, taking up a lot of screen real estate. I'd like to strip out the URL when the customer's label is added. Can this be done?

1 answer

0 votes
Jack Brickey
Community Champion
March 5, 2018

Are you looking to do this thru automation? Not sure that is possible and certainly not natively. You can certainly edit the description manually and you could create a filter looking for the label and add a subscription that would notify you allowing you to manually deal with the issue. 

Drew Nedderman
Contributor
March 6, 2018

Hi Jack, I was hoping to do this automatically through Automation for Jira or Scriptrunner. In the meantime, a label filter would do the trick. Thank you for the response!

Jack Brickey
Community Champion
March 6, 2018

you may be able to do w/ Scriptrunner but the issue is going to be the potential variability of editing the freeform text field (description). If you are confident that the string of text will remain unchanged and is unique then you are likely safe. As an obvious illustration of what I'm trying to convey... Consider an automation that removes the string "the" from the description whenever labels = "remove string". That description would be an interesting read. :-)

Drew Nedderman
Contributor
March 6, 2018

Hi Jack, the string of text that I want to remove links to a gigantic image that takes up a lot of screen real estate. People who work on this customer's issues have a hard time not being distracted by it. As far as I know, the string will remain the same.

Jack Brickey
Community Champion
March 6, 2018

then likely worth trying to automate. especially if it happens frequently. I guess the only question I have is why is it being added at all. but that is likely irrelevant as I'm sure there is either a good reason for it to be there sometimes or simply it is difficult to prevent the creator from adding maybe.

Drew Nedderman
Contributor
March 6, 2018

Yes, it's part of an email signature. I suppose the way to get the user to stop is to convince them to use the portal instead of email.

 

Now I need to figure out how to do this with Scriptrunner. I can do some simple things, but I haven't had the need to do this type of thing until now. Any suggestions?

Deleted user June 26, 2019

Hey, you found any solution for this? I'm also looking for a solution to remove specific Strings in the description of cloned issues.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events