With Jira automation, I have a daily scheduled task that will email the assignee, for each task that is due tomorrow ("Due Date[Date]" = 1d).
What I am trying to do is to put in the subject line the issue key and due date. It's supposed to work with {{issue.key}} is due on {{issue.duedate}}. The issue.key works, but the issue.duedate is blank. I have guessed at the syntax for the due date about twenty different ways and it always comes up blank. I have tried {{issue.fields.Due Date}} and {{issue.Due Date}} and other variations without spaces and changing up the capitalization.
Thanks for any help.
Hello @Derek F
Welcome to the community.
Are the issues in a Company Managed project or a Team Managed project?
Can you show us the full details of the automation rule? What type of action are you using to get the issues that are due?
Hi @Derek F -- Welcome to the Atlassian Community!
Adding to Trudy's answer...
Smart values are name, spacing, and case-sensitive. To confirm you have the correct smart value for a field, please use this how-to: https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/
Essentially you find an example issue with your field, and call the REST API for the issue with a browser. That will show all possible fields supported by rules, and their respective smart values and custom field ids.
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.
@Trudy Claspill : I'm not sure what the difference is between Company Managed and Team Managed, but I'm not a JIRA admin and I'm working within my team's project. So maybe the latter?
@Bill Sheboy : Thanks for the tip, I used the REST API and discovered:
"customfield_11500":"Due Date"
and
"customfield_11500":"2022-12-01"
With that info, I tried:
{{issue.key}} is due on {{issue.fields.customfield_11500}} which WORKED but it's kind of ugly
{{issue.key}} is due on {{Due Date.value}} returned nothing. Which is strange because the doc page says in the example at the bottom:
You can reference this field in a smart value using {{customfield_10034.value}}. To make this smart value easier to read, you can also substitute customfield_10034 for the field’s name: {{Cascade List.value}}.
It may or not be relevant but there are two due date fields in JIRA and I can't remove one for the other as they are available and used Company-wide. One is "duedate" which I believe is the one that comes out of the box. In REST this is showing as null. "Due Date" is the one used in my project.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yup, "Due Date" is one of the messier smart values.
I have seen multiple things work for that field in rules, and so checking with that how-to article can help when in doubt.
And also...sometimes quotation marks are required when a field's smart value contains non-alphanumeric characters, such as {{issue."My custom field"}} versus {{issue.My custom field}} The work-around is to use the customfield id number.
And...if you are seeing multiple "Due date" fields at a site level (for company-managed projects) an admin has added a duplicate and that might cause a problem in rules/field configurations to get at the value.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Derek F
When you are viewing your project, at the bottom of the navigation pane on the left it should say the project is either company-managed or team-managed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It is a company-managed project.
I asked the admin to delete the other due date field yesterday which they did. Hopefully that helps in the future.
I can live with the custom field id if specifying the words "due date" doesn't work out, I just think it will be confusing if anyone comes along after me and tries to work on the automation. NBD
@Bill Sheboy I tried several "Due Date" syntaxes and they were all blank.
@John Funk see below
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Derek F
I just did a quick test in a Company-managed Project, and here were my results:
That last one has stopped working in rules but I believe still works in JQL and the REST API.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have asked the JIRA experts / admins to take a look at this and they will today. I want to mark the correct comment as the answer when I know what it is
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I still don't have the correct syntax figured out to use "due date" english in some permutation even with my org's expert help, however, the customfield actually solved my original issue so I am marking this as the correct answer thread
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Derek - Welcome to the Atlassian Community!
I used this with success for the subject:
{{issue.key}} is due on {{issue.duedate.longDate}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You have another issue then, because that worked perfectly for me.
Can you share a screenshot of your rule that shows the details of the email?
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.