I swear @Bill Sheboy has answered similar questions but I couldn't figure out if any of them fit my use case.
In a nutshell, I have a bunch of tasks linked to a "parent" Epic. (They aren't actual child tasks because they're under a different Epic. It's complicated and I'll explain it in a separate article if I get this working.)
So I'm using a Branch rule / related work items with the following JQL query:
issue in linkedIssues("{{certParentKey}}") order by issuekey
So yeah, the query returns ISSUETMP-6808 , ISSUETMP-6809 , ISSUETMP-6810 , ISSUETMP-6811, ISSUETMP-7298 , ISSUETMP-7302, in that order.
The thing is, the person who requested this automation would like those tasks to be kept in the same order.
And well, since we've been waiting 5 years for actual resolution of AUTO-32, the ticket formerly known as Allow switch between parallel and sequential execution of Automation Rules ... I can't figure out how to do this.
To paraphrase Princess Leia... "Help me @Bill Sheboy you're my only hope"
% telnet telehack
.starwars
Alternately: https://www.asciimation.co.nz/
Hi @Darryl Lee
Until a sequential branching feature is added to rules, there are a few workarounds, each with their own cost / benefits / risks. Some of these will not work with linked work items, but I will list all the ones I can think of regardless.
Some shared risks for the workarounds are:
#1) One-by-one creates
#2) Chained rules (FYI -- I would not recommend trying this one.)
3) Multiple rules with recursion
#4) Build your own external app
#5) Build your own Forge action???
#6) Investigate marketplace apps / addons
Good luck, Darryl, and let us know what you try. Thanks, sir!
Kind regards,
Bill
Thanks for responding to the Bat-Signal, @Bill Sheboy (truly mixing the movie/tv references), I knew you'd come through.
#1) Alas, no, the number of linkedIssues is variable, depending on the type of certification
#2) My reaction while reading this was that I said "Oh god" then made this face:
(I was gonna use clip art, but eh, cool hat.)
#3) Hmmmmmaybe? I mean should the fact that an Atlassian team member wrote the article mean it's kinda sorta supported? Hahaha. Ok, yeah, I guess it's like an internal function instead of doing #s 4 or 5...
#4) Ah right, like a AWS Lambda job that accepts list of issues, and new parent, and then serially creates them? That doesn't sound awful, except the maintenance part.
#5) Oh god. Yeah, this is what @Caterina Curti and @Bryan Guffey would surely suggest. Also maintenance, but I guess at least I wouldn't have to worry about an AWS bill on top of it. (As miniscule as that would be.)
#6) We're too cheap for an app, and it also feels like overkill, but I'll take a look. Geez, there are so many. Maybe we really do need Personalized app recommendations in search results! (Kidding. I hate that idea.)
Ok, lots to chew on. Thanks!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Darryl Lee -- how about a maybe #7 approach:
Using the Bulk Create Issue endpoint, use list iteration over a lookup result for the linked work items to build the JSON message, and try adding them with one Send Web Request.
I could not find information if the items are iterated to add sequentially or in parallel, so testing would be required. And, this puts the entire burden on the rule-writer to manage all the cloned fields in the message.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Woof. I think there's a couple of issues with that. It's Bulk Create, not Bulk Clone. Reading the (admittedly sparse) docs, I don't see a way to reference a "source" issue to copy.
So I'd have to get pass it the full content of each child task I'm cloning? (I mean it's probably just Summary and Description, but what if I miss a field?)
But I'm now leaning towards #3 because despite the scariness of recursion, I do like the idea that everything stays within Automation. No external calls, no API calls. It's all blocks, so if somebody does have to figure out what the hell I did, they won't find some black box somewhere outside of Jira.
Nope, it'll be a black box in another rule. :-}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you can’t reliably keep order when cloning from a JQL branch. Automation runs branch items in parallel, so even if the JQL is sorted, the clone actions don’t respect that order.
The only practical workaround is to add an explicit ordering field first, like a number or rank copied into a custom field, then sort the cloned issues afterward using that field. If order truly matters at creation time, Automation can’t do it today and AUTO-32 is still the blocker.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks - good point on ranking after creation, although what they really want is to see those child tasks in order while viewing the epic.
Hum, will need to look at @Bill Sheboy 's suggestions.
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.