Forums

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

How to use "Find and remove these" in field "Affects Version/s" in JIRA Automation?

Thomas Scheer
April 21, 2026

is there a way to use "Find and remove these" with a dedicated value, e.g. development-SNAPSHOT in field "Affects Version/s" (known from Bulk change) in JIRA Automation, e.g. in edit issue (issue actions)?

1 answer

2 votes
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 Champions.
April 21, 2026

Hi @Thomas Scheer -- Welcome to the Atlassian Community!

For a question like this, context is important for the community to help.  Please post the following:

  • What problem are you trying to solve with this rule; that is, "why do this?" 
  • You tagged this question as "jira-data-center"; please confirm if you are using: Cloud, Server, or Data Center
  • An image of your complete automation rule in a single image for continuity
  • Images of any relevant actions / conditions / branches
  • An image of the audit log details showing the rule execution
  • Explain what is not working as expected and why you believe that to be the case 

 

Thanks, and kind regards,
Bill

Thomas Scheer
April 23, 2026

I have a daily automatic process to scan a certain repository with CICD-tools e.g. version : 12.19.1-SNAPSHOT

For each finding in this codeline, a JIRA Ticket is created with the "affected version": 12.19.1-SNAPSHOT

once a week I want to "reset" these tickets regarding the affected version. So 12.19.1-SNAPSHOT should disappear from the affected versions of a set of tickets.

I can do this manually using the BULK CHANGE function of JIRA. BUT I'm looking for a JIRA automation (scheduled) which does the same job.

JIRA: on-premise Server

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 Champions.
April 23, 2026

Thanks for that information, @Thomas Scheer and it appears you have not tried creating the automation rule yet.

Based upon you using the bulk change feature, it seems you can write a JQL expression to find the issues to update.  If that JQL can be made generic or dynamic, you could use a Scheduled Trigger automation rule to find and edit the issues.

If you run into challenges doing this, please post an image of your complete rule and the audit log details, particularly the JQL used.  Those will provide more context for the community to offer better suggestions.  Thanks!

Thomas Scheer
April 24, 2026

Hi Bill, thanks for your response.

That is exactly what I have done, BUT 

edit the issuesthere is no possibility to use "find and remove" on a field e.g. affect versions in my JIRA server

That is my initial problem.

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 Champions.
April 24, 2026

Are you trying to clear the field, or only remove one specific value from any which are already in the Affects Versions field?  

#A) For the clear the field case, try editing the field to an empty value.

#B) For the remove one specific value case, the rule will need to use an Advanced Edit with JSON to set the value.  That will require building a dynamic JSON expression with only the remaining values for Affects Versions.  Some techniques from this article I wrote on finding list overlaps may help do that.

For example...

  • let's assume you have a Created Variable named varVersionToRemove for the one to remove
  • then, create another variable to remove that from the existing values
    • action: Create Variable
      • name: varRemainingVersions
      • value:
{{issue.versions.name.join(",").replace(varVersionToRemove, "").split(",").match("(.++)").join(",")}}

What that does is...

  • gather all the Affects Versions, value names, joining them into a CSV string
  • replace the target one to remove with an empty string
  • split that CSV back into a list
  • use a match function to only keep the non-empty ones
  • rejoin the list back into a CSV string

Now, to use that final variable to update the field, first confirm it is not empty

  • advanced compare condition
    • first value: {{varRemainingVersions}}
    • condition: does not equal
    • second value: leave as empty 
  • action: create variable
    • name: varJson
    • value:
{
"fields": {
"versions" : [
{{#varRemainingVersions.split(",")}}
{ "name": "{{.}}" } {{^last}}, {{/}}
{{/}}
]
}
}

That will iterate over the variable to create a dynamic JSON expression to set the field value.  Then finally...

  • action: edit issue
    • use the advanced edit, using only the variable {{varJson}}

 

One advantage of doing this step by step with variables is to allow writing the results to the audit log to confirm things work as expected.

Suggest an answer

Log in or Sign up to answer