I have an automation to create a sub-task for certain events and have the due date set to: {{now.plusDays(3).toBusinessDay()}}. However, I want to add a rule to not exceed the due date of the parent. Maybe even have it 1 day prior to the parent due date. I am not a JQL expert, can this be done?
Hi @Ryan McGee
That seems possible with automation rules. I am using Jira Cloud, and not Server/Data Center version, and so I cannot test the following for your tooling...
{{#=}}MIN({{now.plusDays(3).toBusinessDay()}},{{issue.parent.duedate.minusDays(1)){{/}}
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @彥宏(Luke) 劉
The specifics of the rule will depend on your scenario. That is, which issue do you need to check / update.
If you look at the expression I wrote above you can see how to compare an issue's parent due date to the current date (adjusted). To use that for an edit, type it in the edit field value, it will appear below the field, and then select it.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What is the field type for your custom field? If they are not both date type I wonder if the comparison using isBefore() does not work as expected. You can check this by writing the value to audit log (or checking the field configuration)
Another thing to try is to use the same format for the two fields (i.e., your custom field and duedate), and modify the comparison:
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.
I am glad to learn that helped. Please consider marking this question as answered; that will help others with a similar need find solutions faster. Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Bill Sheboy
" Please consider marking this question as answered "
>>I would love to do this, but this question is not open to me.
If possible, I have to open a new question, so that after you can answer, I will choose the correct answer to your question 😆
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My mistake; I missed you had not raised this as a new question. Please disregard my comment.
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.