I'm trying to achieve the planning of the timeline with Jira Automations.The goal I want to achieve is (recurring task with a CRON job - everyday at set time):
Hello @Nikita Vlasov
This is not fully helpful, but I suggest using these smart values through this link: https/support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/.
Normally, you have everything you need there. It means you can compare dates ,business days, add or subtract dates, etc.
For the max or min value of an epic, you can use the 'lookup issue' smart value.
BR
Thanks for your reply!
Yes, indeed, I did used 'lookup issue' for finding max and min values of the all children tasks from the epic. But the biggest flaw in this automation that I can't handle the path of the script e.g. I don't know how the script will behave in each run and what task will be executed first, second, etc. To solve this I tried to use 'lookup issue' with "SORT BY Rank" to sort them by ranking from the timeline (that's the intended way of sorting issues priority). The issue that lookup issue return a string value like an every and each smart variable in the automation. BUT the List function to get an item by index (lookupIssues.get(index)) ASKING for a number value which can't be retrieved hence all smart variables are strings and making it var.asNumber does not solve the issue, also making the math expression to do val * 1 return an error. So I cant effectively track what rank does current executed issue have to get a previous issue "Due Date".
Hi @Nikita Vlasov -- Welcome to the Atlassian Community!
Short answer: what you describe is likely not possible with the features of Jira automation as you want to process issues sequentially and access the prior issues while branching (assuming a specific issue ordering). Seeing your specific scenario details will confirm that...
For a question like this, context is important for the community to help. Please post the following:
Until we see those...
There are lots of community posts about trying to re-create features of purpose-built, project management tools, such as: sequential processing, cascading date updates with forward-and-backward sync, bulk-dependency shifting, etc. You may search the community to find those and where others have investigated marketplace apps or external project management tools to help.
Automation rule branches which could be on more than one issue are processed in parallel and asynchronously, with no guarantee of processing order or when the branch will complete...up until the last step of a rule.
Further, the date updates you explain seem unclear. Why would the Start Dates be updated repeatedly, and potentially updated to have values after the Due Dates?
Kind regards,Bill
Thank you for your reply!
I have tried to cover as many aspects as I can in the post, so to add to that:1) The problem I'm trying to solve is planning on a timeline, so for a tasks that have the estimate in time value I want to be able to set start and due dates while they are in the todo queue for the developers. This will resolve the problem when management doesn't understand how much time will each epic take. This will allow us to see the workload by each epic and by each developer and furthermore plan the future releases.
2) The project is team-managed (e.g. the management and developers do the job)
Details to the automation rule:
Image 1: the rule executes as scheduled rule and go a lookup through the all tasks with the similar parent. Then it creates two variables with max due date of all epic tasks and min start date.
The scheduled trigger set to the one task that I'm testing on, when it will be working, it will be set to the required JQL that will fetch all "To Do" issues with epics assigned and estimates.
Image 2: (Not sure this is required but it works for the case when no Start date is set for the issue) The IF case checks for the "Start Date" field be empty and then executes the logic I described in the original post text.
Image 3,4: The ELSE case starts up for when the "Start Date" is not empty and was already populated. This is the part I can't get to work. Here I try to do a lookup issues through the all "To Do" (in our case "On Deck") tasks to find their rank to know what task was previous. I believe this should work if I can somehow transform the index variable that I got from branch to a number and not a string and then create a variable that will take an issue by its index from the lookupIssues array via lookupIssues.get method. But since it accepts only numbers and not string that returned from the smart variable or the branch variable itself, I can't get the needed issue.
Then I create the IF statement that will check if the Start Date of the current issue is less or equals to todays date and then set the Start Date as described in the original post.
Image 5: This part works as it should, It creates a variable that calculates minutes to days + hours and if the number of days are greater then 1, it sets the Due Date to the day the task should end, if the number of days are less then 1, it sets the Due Date to the current day.
Answering to your last question: We do need to repeatedly update the To Do issues so they will change the epic length on a timeline and they can be planned according to the priority.
Let me know if you need the full audit log for this automation.
This rule appears to be accessing issues in the lookup using their index value (i.e., a 0-based index) and then repeatedly updating the trigger issue. Is that what you expected?
As written, this rule uses an Advanced Branch, which iterates over data and not issues. Thus the Edit Issue action shown within the branch is updating the only issue in scope: the trigger issue.
Thank you for the reply. Yes, I decided to do it this way to iterate through the indexes if the lookup issues so inside of the foreach branch I can take that index and get the current element, but the part where I'm trying to list.get the issue by the index doesn't working, since the smart value always return string, but the get method accepts numbers.
It looks like you're new here. Sign in or register to get started.