I am looking for an automation if there is anyway for the same Assignee the Due Date is set as per the tasks max due date that are already assigned.
Nabeel is assigned with 2 tasks with due date:
22/9/2024
25/9/2024
If I assign one more task to Nabeel, that task will be 25/9/2024 + 5 business days.
How can we find the max due date for a specific assignee?
No Answer covered what was asked for so far
For your scenario to access the maximum Due Date value, there are two possible approaches:
As you appear to want to use the value to edit an issue, the second approach must be used.
Unlike with Jira Cloud, the Lookup Issues action cannot be used for this scenario: the results contain a limited number of fields, and the Due Date is not one of them: https://jira.atlassian.com/browse/JIRAAUTOSERVER-877
Kind regards,
Bill
@Syed Nabeel Anwer - Follow the below steps to create the automation rule for your requirement
Assignee != Empty
).Add a new Branch Rule / Related Issues:
Choose Related Issues: JQL
.
Use the following JQL query to find all issues assigned to the same assignee that are not the current issue:
assignee = {{issue.assignee}} AND project = {{issue.project}} AND key != {{issue.key}} AND duedate IS NOT EMPTY
After setting up the branch, add the following action:
Variable name: maxDueDate
Smart value for variable :- {{issues.duedate.max}}
This will find the maximum due date (in milliseconds) of all issues assigned to the current user in the project.
Choose Due Date as the field to update.
Set the Due Date using the following smart value:
This formula will add 5 business days to the maximum due date. Note that the formula is adding 5 days in milliseconds (5 * 24 * 60 * 60 * 1000
).
Save and publish the rule.
Hope this helps!
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Even tried the changes you have applied, the due date is not populating in the assigned issue. One confirmation, edit action will be performed outside the branch.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I put the log for maxDueDate its showing all the three values in it. I think thats the issue
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, it is possible.
When the ticket is assigned check if the assignee is Nabeel, then look up issues via query it will return the due date of all issues and then find the max due date via lookupmax function and edit the due date field via smart value mentioned below.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Moazzam for the response. This automation may run perfectly for the current user. But the ask here is if I assign any task to other user, in that case his/her max due date + 5 business days should be set for the task.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I believe the lookup issues action for Jira Server / Data Center does not support the due date field yet: https://jira.atlassian.com/browse/JIRAAUTOSERVER-877
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Syed Nabeel Anwer ,
I have added current user just for testing, please use this query
assignee = {{issue.assignee}} and duedate is not empty ORDER by due DESC
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As @Bill Sheboy highlighted the JIRA server can't return the due date via the lookup function, Please first try to print the value and see if it is returning the result or not.
You can use the log action function and print the value via smart value
{{lookupIssues.Duedate.max.plusBusinessDays(5)}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There is no value reflecting in the log, although its picking up the issues in the criteria but not returning the max due date
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.