I need to automatically set the Due Date to the current date plus 48 hours from the moment of issue creation for tasks created in Jira (only for projects with key 'N') and with the Issue Type 'Ticket'. For example, if a ticket is created on June 13th at 12:00, the Due Date should be set to June 15th at 12:00, excluding weekends.
If I use the expression {{#issue.dueDate}}func=now.plusBusinessDays(2){{/}}, the Due Date field is only updated if it already has a value.
Could someone help me with this?
{{#issue.created}}{{.format("yyyy/MM/dd")}}{{/}}
Does Jira Software 8.12.2 have the function .format("yyyy-MM-dd") at all?
Depending on rule structure, could we switch the smart value out to {{now.plusBusinessDays(2)}}? It would achieve the same thing as running off of creation
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.
Hi, its doesnt works 2
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just to make sure, is there any customfield with the name created ?
Have you try to replace issue.created by now ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Viktor - Welcome to the Atlassian Community!
What if you just changed out dueDate in your first example with created?
{{#issue.created}}func=now.plusBusinessDays(2){{/}}
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.
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.
Hello,
To test the format requirements of the Due Date field, I tried setting issue.createDate.toInstant().atOffset(ZoneOffset.UTC) manually to the Due Date field
Now I don't get any errors in the logs, but the date is still not set in the Due Date field
That is, I first try to set today's date, and then add 2 business days to it.
The problem is more that I cannot determine today's date for DueDate field
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
See if you can set it to {{now}} when it is created.
And if that works, then add an Edit Issue after that first update to use:
{{issue.duedate.plusDays(2)}}
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 really think something is jacked up with your instance. {{now}} should work.
https://confluence.atlassian.com/automation/jira-smart-values-date-and-time-993924864.html
I would go ahead and submit a support ticket with Atlassian.
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.