Hello,
i have to set a due date with an automation for jira automation on jira datacenter. The due date should be the last day of the current quarter and i thought i could do something like this:
{{now.withmonthOfYear({{now.format("Q").multiply(3)}}).endOfMonth}} or
{{now.withmonthOfYear({{#=}}{{now.format("Q")}} * 3{{/}}).endOfMonth}}
but its not working. Is there a way to achieve this?
the .multiply thing doesnt seem to do anything at all, but the expression
{{now.format("Q")}} * 3{{/}}
does give back the numer 3 i would need, but if i use that in the due date field i cant even save the automation.
@Bill SheboyHello,
the datacenter version doesnt have the variable functionality. I was able to save the rule with the asNumber part, but it again didnt work. The due date fields just stays empty. I was able to do it with a scriptrunner script...but it feels like overkill :(
You might need to convert the result of the format() operation to a number for the math to work, or store it in a created variable and then use it. To do it the first way, please try:
{{now.withMonthOfYear(now.format("Q").asNumber.multiply(3)).endOfMonth.jiraDate}}
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.
Please try to keep your responses to one thread of conversation. That will help others see if there are multiple approaches to solve the problem. Thanks!
And thanks for noting you are using the Server/Datacenter version. Please try to include that information when posting questions as the different Jira versions have different behaviors.
The smart value expression I provided will return the correct value. To use that to set the Due Date field try removing the last part which specifies the data format:
{{now.withMonthOfYear(now.format("Q").asNumber.multiply(3)).endOfMonth}}
If that still does not help, please post images of your complete automation rule and of the audit log details showing an execution of the rule which does not work. Those images may provide more context for what is happening.
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.