I am looking to display the % Complete of an issue based on the number of child issues resolved and write that to a custom field so that I can display it in a Kanban Card.
I got it working using Jira Automation - setting up a rule to write a calculated value to a specific issue type on creation or update. See image below.
Is this the best way to do it or is it better to do something using ScriptRunner, possibly using a Listener and having that update the field?
Calculation in the Edit Issue fields is:
{{#=}}{{OpenIssues}} / {{TotalCount}} * 100{{/}}%
Hi @James Woyciesjes - welcome to the community
I would not call any of the ways better. It depends on several subjective criterias eg.
I do a lot with A4J as well as Scriptrunner. Both of them will do the job you need perfectly (as you already solved with A4J)
As mentioned before A4J is easy accessible within the project. Also it doesn´t assume coding knowledge. so it´s quick and easy to use.
Mainly I use Scriptrunner for more complex use cases. One advantage (that could be interesting for this special use case here) that I personally like in scriptrunner over A4J is the update function. With scriptrunner you could send an update event after issue/field manipulation. Therefore it immerdiately shows the new field value. A4J does not send an update event therefore sometimes it will show edits after a refresh.
Please let us know if you have further inputs/questions.
Best
Stefan
I think you swapped OpenIssues with a resolved ones (resolution IS NOT empty means it's resolved).
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.