Hi everyone,
I have a Jira Automation Rule that updates the Due Date of tickets based on a PDI Location. Currently, I’m importing tickets via CSV and the due dates are being set, but I want to enhance the rule:
When importing multiple tickets (e.g., 11 tickets), I want the automation to:
Currently, my rule sets the same due date for all tickets, ignoring the batch limit.
Is there a way to configure Jira Automation to set due dates dynamically in batches, respecting business days and a max tickets-per-day limit?
Any suggestions or examples of smart values or automation setup would be very helpful!
Hi @Santhosh Raj ,
You might be able to use the work item key.
Create a var called 'num':
{{issue.key.match("[A-Z]+-(\d+)")}}
The above regex will capture the item key as number. ABC-123 => 123
Then create a var that select which batch the item belongs to. You indicate that you have 3 batches of 5 items. And the fourth batch should be the same as the first one.
Var 'batch':
{{#=}}((({{num}}-1)/5)%3)+1{{/}}
This will divide the issue number into one of the three batches (%3 = modulo 3, if you want to divide it into a different amount of batches, just adjust this number. If you want to put more items in a batch increase the number 5 in the formula.)
Then edit the item and set the due date to:
{{now.plusBusinessDays(2 + add).toDate}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.