So the workflows are set up as such:
There are two workflows in two issue types (A and B).
Workflow/Issue Type A will go through a transition where it'll create 3 tickets linking all 3 as blockers to Workflow
At the same time, Workflow B will be one of the three tickets (lets call it a) and upon creation, execute a transition where it's supposed to establish one of the other 3 tickets (lets call this one c) as a blocker to Workflow.
Unfortunately, doing it in this way doesn't seem to work. However, running the transition in manually in Workflow B works just fine.
Looking at the history of the issue, i can see the transition does execute, but the post process where the links are established in workflow B don't. Please let me know if I can provide any further information.
Can you provide the post functions for both Workflow A and Workflow B?
Have you watched the logs during the on B?
From what it sounds like, Issue "c" doesn't exist at the time issue "a" is trying to establish the link since the 3 issues ("a", "b", and "c" like in your example) are created one at a time when Issue Type A goes through it's transition to create them. Take a look at the logs and see if there is an error that "issue does not exist or something" when "a" is trying to establish it's link to "c". My guess is that at the time of the transition on "a", that "c" does not exist yet because "A" is still creating "b" or even still in the process of creating "c".
Without more info, not sure if I can provide any further help but if I was trying to do something similar. I would create them in this order "c", "b", then "a". Then the post function for "a" should be able to find "c". Make sense?
If that is not possible, look into applying a wait through a scripted post function or something.
Thanks for the advice. Here is workflow A (1st Image) which transitions into Workflow B (2nd image)
Your suggestion makes sense though unfortunately, my hands are tied in the way these issues are created as they need to go in this specific order due to how our department handles issue tracking.
You may be onto something when you say "c" isn't created yet and I may just need to account for that. I'm currently looking up a way to check out any logs associated but I'm not entirely sure how to do so.
To view the logs, 2 options that I use on a regular basis are:
The log that would probably be the most helpful is the atlassian-jira.log
Thanks for the steps. Went for the second method and I end up with a huge stack that I'm not sure I'm reading correctly, but it does state the index is out of range which I take it to mean you probably hit the nail on the head regarding the delay. Is there a specific post function dedicated to delaying a set of post functions in a transition?
If you have a moment, could you please verify i'm performing the following correctly. It's the first time i'm using a wait function and while I do notice a delay in the creation of the tickets, it doesn't seem to make any difference:
A is created and is the issue I need tied to B and C. I tried setting a wait time between A and B but that still resulted in it being unable to link the issues as needed.
Issue B then has a wait applied (I tried before and after create issue originally and with a max timeout of 10 seconds with the same results) in the hopes that issue A will be finished creating by the time it creates this issue. From there it's supposed to execute the transition that should link A to B
This transition is supposed to link A to B and it does so when manually executing, but not when it's set up as I currently have it.
@Jose Sepulveda So if I read the screenshots and your description correctly, the first screenshot is the order the issues are created, the second is the workflow for issue B, and the last is the transition for issue A?
Does the logs show anything when these issues are created?
One thing you might be able to do is create a special event and have a listener do the linking. that way it is the last post function to fire.
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events