I currently have a series of subtasks triggered by an event. There are 2 chains of tasks that each chain link is dependant on the previous task being completed before the next can be started. I have this happening by the top subtask of each chain not being linked, but each next subsquent task having a linked issue that is blocked by most recently created issue. I have a subtask that will also need to be completed once both chains of subtasks are finished, is there a way to have that task reference not only the "most recently created issue" which is the task just above, but also a task listed 5 above (the end of the other chain)?
From some of the information in your question, I am assuming you are working on an automation rule.
For a question like this, please post an image of your complete automation rule, images of any relevant actions / conditions / branches, an image of the audit log details showing the rule execution, and explain what is not working as expected. Those will provide context for the community to offer ideas. Thanks!
Until we see those...My guess would be "maybe", depending upon the structure of your rule.
Let's assume your rule is creating those subtasks, one-by-one, with no branching or if/else structures in the rule. In that case, you could refer to a specific created issue using the get() function, such as {{createdIssues.get(3)}} to refer to the fourth created issue, as the get uses a zero-based count.
If that is not the case, perhaps you could save the key of a created issue using the Create Variable action, for later use in the rule.
Posting an image of your rule will help to confirm what might help.
Kind regards,
Bill
Gotcha, will always try and include a picture. Totally understand how that might help.
Ok so here is sample rule that I'm talking about, very straight forward trigger happens -> 6 subtasks with details are created.
Now theres several "chains of task"
1 & 2 are related, 2 is linked and blocked by 1. Linked issue "is blocked by most recently created issue. " that works just fine,
3 is its own issue, not blocked by anything
4 is blocked by both 2 and 3, but I can only see how to make it blocked by 3, same as the rule applied to 1&2, linked and blocked by most recently created issue. **
5 is blocked by 4, works fine, same as the 1&2 rule.
6 is blocked by 5, but also a subtask in a completely different automation that is trigger by the same trigger. **
So my questions is where my **'s are, how can I have a linked issue to another subtask created either inside the same automation or outside?
You mentioned "you could refer to a specific created issue using the get() function, such as {{createdIssues.get(3)}} to refer to the fourth created issue, as the get uses a zero-based count." but in the linked issue field I only see the ability to use "Most recently created issue/trigger issue". Where would I be using this get() function?
And for your suggestion of using a saved key as a variable, can you expound on that? Are you saying create a custom variable that is then assigned with copy value of key (insert proper syntax here), that a rule further down calls to, to say it blocks or is blocke by?
Thanks for the help!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please let me know if I miss any of the questions you asked...
When creating (or editing) an issue, you may often type in a smart value expression. Type in (or paste in) the smart value, and it will appear below the field. You may then select it to use it.
For your scenario of adding 6 issues, you want to add several links. For the links on the already created issues, you can use {{createdIssues.get(someNumber)}} to refer to that issue's key, where someNumber is that 0-based method for the get() function of lists.
For example, you are creating issue #4, and linking to #2 and #3. The values to use would be: {{createdIssues.get(1)}} and {{createdIssues.get(2)}} respectively.
This is easier than the other method I noted: created variables. A created variable can store something which may be used later in a rule...in many cases. There are some limitations, so the earlier method I note works well for your case. The created variable would be better if you were doing if/else conditions, etc.
You also note wanting to link one of your six to "a subtask in a completely different automation that is trigger by the same trigger". That is not possible inside of this rule, as it cannot "see" that other rule's information.
I believe a viable alternative is to combine the rules so the subtasks are visible to each other at their create time. Otherwise there is no guarantee when both subtasks will exist in order to link them.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So I was going to say that there were only 2 options trigger issue or mostly recently created issue, but for those who are new to this whole thing, know you can just start typing in that box and it will accept other entries. Its not entirely obvious.
That being said, a very noob question.... How do I properly use "and" to reference both issues?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, what I meant was that would be 2 different links added. And so each smart value is used separately.
And I agree: that ability to enter and select a smart value for some rule components is not in the documentation. I only found it by experimenting.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
where do I assign the second link? I dont see a way to have a second linked isssued field, would that be something I add in the additional feilds portion?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Oops, sorry: I forgot that the Create Issue action only supports adding one link at create time (due to a limitation in the REST API function).
The work-around is to add one of your links with create, followed immediately by:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Eureka!!! That worked. For anyone else that comes behind please look below at pictures of the 3 steps for setting that up.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Awesome; I am glad to learn that worked for you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So I was going to write I'm not sure where you wanted me to write in the refence to the other values, but to anyone else that comes across this post, where it gives you the 2 options of trigger issue and most recently created, just click the box and start typing. Its not very apparent to newbies as it looks like you can only select from the avaiable options.
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.