I have tasks transitioning from one stage of work (status) to the next, and along with this I need to add, for example 3 days to already set due date automatically.
I've added the action edit due date and tried smart values such as {{now.plusBusinessDays(3)}} {{issue.duedate.plusBusinessDays(3)}} {{issue.created.plusBusinessDays(3)}} but none of them work. I also tried adding conditions like due date is not empty. I also always add a condition to specify issue type. And I always get one error in the log (the field due date is available in the work types)
Is there a solution to my needs?
Hi @Olesia Zhukova -- Welcome to the Atlassian Community!
Adding to the suggestions from others...
There are several additional possibilities for that rule symptom. Unfortunately, the messages in the audit log do not always match the root cause. Please check the following:
#1) Who is the rule actor in the details at the top of the rule?
The default is Automation for Jira, and that user should have the permissions needed for the rule. If someone changed the actor, why did they do so? I believe changing the Due Date requires the "Scheduled Issue" permission, and perhaps a different user does not have that one.
#2) Are there multiple fields named "Due Date" in your project?
When using a team-managed project, it is possible to add a field which collides with the same name as the built-in field. If this is the case, please work with the project admin to learn why that field was added and consider removing it.
#3) The Due Date field is a date only field, and many of the smart value functions use date / time by default. You can enforce setting the field correctly by truncating the time part when setting the field:
{{issue.duedate.plusBusinessDays(3).jiraDate}}
Kind regards,
Bill
Here's the details
And the due date is created by another rule. When the task is created.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Bill Sheboy
Sorry for the reply above. Didn't notice to whom I reply.
To your points,
The rule actor is automation for Jira, and I didn't find the Permissions Schemes tab.
I have only one due date field in my project.
I tried the smart value you provided and the rule still failed.
Thank you for your advise,
Olesia
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for that information, @Olesia Zhukova Let's confirm one of those and check another hypothesis.
Before we do that, would you please post an image of your complete rule in one single image and the complete audit log details for the execution? Those will provide better context to confirm we are all considering the same things. Thanks!
For an example work item (which triggered the rule), please use the how-to article to find all smart values the rule can see to check the fields. For example, in a browser tab, enter:
your Jira URL/rest/api/3/issue/your Work Item Key?expand=names
Then search on the page for "due date" to check for multiple fields which could be confusing the rule action.
Next, look at the workflow for this work item type, checking for any conditions / validators added to the transition you are attempting.
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 mentioned some posts before I would highly recommend to check the permissions. If you don´t have access to the project´s permission scheme I suggest to contact your admin.
I could reproduce the error with the exact error message by granting the permission "Schedule Issues" only to eg. assignee (no other user or role is allowed). By running a rule that changes the due date (the rule is operated by the automation-addon-user) on an issue that is not assigned to any user the rule fails as described:
Best
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Bill Sheboy
Here's the complete rule.
And here's the audit log details
I've set up all of the possible permissions I am pretty sure I didn't miss anything there.
And I can't get anywhere using this template? maybe it's my mistake but I did triple check to put everything right.
your Jira URL/rest/api/3/issue/your Work Item Key?expand=names
Also, I made a rule today to add an extra day to due date when task is overdue and it works. It has the same smart value as I use for this rule and the actor of the overdue rule is myself, but when I set myself as an actor for transition rule it gives me this error in the log
Thank you for all your advice! I am really at a lost here
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
First, that URL template I provided to check the fields is a template: you need to use your own Jira URL and Work Item Key.
Next, from what you describe with the new / second rule, perhaps your first rule is corrupted. This can happen occasionally with the rule editor. The way to check that is:
Finally, your new / second rule does show you do not have permissions to schedule work items (i.e., change the Due Date) and so leave the rule actor as the default: Automation for Jira user.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Bill Sheboy
I checked the field using URL and theres only one. So no problem there
I noticed that no metter the actor or rule, the automation ignores editing fields. Like other actions work fine, but this exact one doesn't. So far it works only in three rules that I've made and i don't see why there it does work but on the other rules it does not.
At this point I am ready to give up😃
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for that additional information, @Olesia Zhukova
As this point, I recommend working with your Jira Site Admin to submit a ticket to Atlassian Support to take a look. You appear to be on a paid license, and so your admin can do that here: https://support.atlassian.com/contact/#/
When you hear back from them, please post what you learn to benefit the community. Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Welcome to Atlassian Community!
The error you get in the audit log indicate that the due date field is not on the screen used by the work item. Automations can only change fields that are on the screen.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I know right, but it's on there and I already have a rule working to create a due date when the task is created.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
could you please also send a screenshot of your rule to see how the edit actions are configured.
Furthermore as far as I know it´s not possible to edit the created date as this is a hard written date (often used for revision) by jira.
Thanks in advance.
Best
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for responding quickly!
My rules look like this mostly.
And yeah I found someone with a similar problem on here, but the date was 2015 so I thought things must've changed
Thanks,
Olesia
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In the screenshot it only shows one closing } . But I guess this is only hidden by the end of the field.
Furthermore could you please send another screenshot of your rule details? Who is the actor of this rule in the details? Does that user have the permission to edit the the due date /schedule a work item?
Did you configure the manipulation of the create date in another rule?
Best
Stefan
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.