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)?
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:
Thanks, and kind regards,
Bill
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bill, thanks for your response.
That is exactly what I have done, BUT
edit the issues: there is no possibility to use "find and remove" on a field e.g. affect versions in my JIRA server
That is my initial problem.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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...
{{issue.versions.name.join(",").replace(varVersionToRemove, "").split(",").match("(.++)").join(",")}}
What that does is...
Now, to use that final variable to update the field, first confirm it is not empty
{
"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...
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.
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.