All, I manage several projects on Jira DC edition where teams forget to archive versions after they are released and in turn use these released versions in new issues causing compliance problems, so want to automate archiving "released" versions.
I have been able to solve this problem with a work around, it works in theory but misses one use case (which I will list below) and needs to be run on a schedule more than once a day in our use case, and I was wondering if there is any easier way which I am missing.
Solution I implemented which works:
1. Scheduled a rule with JQL which searches for issues in released fix versions.
2. If {{issues.size}} is >0, using {{fixversions}} smartvalue, making a call to unresolved issues count REST API to check if it has any unresolved issues.
3. If no unresolved isssues, I update version to archived, else I "un-release" the version.
Pros: It correctly either archives / unreleases depending in if it has unresolved issues.
Cons: Because it handles 1 version at a time, job needs to run frequently to catch up if a project has multiple released versions.
It cannot pick up versions which are released but have no issues in it. I know this does not make sense but we have projects who do this and this rule cannot pick them up.
Solution I wanted to implement:
Please NOTE: I am not on DC 9.0.2 automation, so we dont have variables / lookupissues available neither is advanced branching. We have plain vanilla automation options for conditions & actions.
I wanted to:
1. Make a REST call to get all project versions
2. Loop through the response and If {{webhookResponse.body.released}} is true but {{webhookResponse.body.archived}} is false, then archive.
Problem: how do I loop through result set? When I put the above check in a if condition, I am only able to pull up the first release's value in the result set and rule stops after that (obviously.)
Is there a solution/approach I missing? Any help is appreciated or let me know if I can clarify anything else!!
First thing, is this for one project / team, or are many forgetting to "clean up their yard"? If it is one team this may be a training issue (until the process can be automated).
Back to your question...
I believe you have described the situation and limitations quite well! And, because Jira DC automation does not have advanced branching yet, that will not help.
You could add one more rule to your set, triggered on version released, and then perform the archive with Send Web Request to the REST API function. Those three rules would cover the cases, and the frequency need would determine your schedules for the others.
Other options are:
Kind regards,
Bill
Wow. Thanks @Bill Sheboy as always!! I knew I was overthinking this thing. lol.
As you mentioned, there is a "version released" trigger and I could do the same thing very simply now that I am caught up with archiving previous versions that go forward, this is done at the same moment they release, and it will catch even the ones which have no issues.
Just additional info - We have multiple (14) projects which I help oversee in an enterprise. So this is me trying to make sure I restrict them so chances to not meet compliance is minimized in the future.
Thanks again!!
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.