I am using above code to get the custom field value in automation scheduled mail. But not working.
Using custom field from my project-
{{issue.Expected Customer Delivery/Deal Closure Date(CXL=>Customer Production)}}
got support from this link- https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/
Please help to resolve this.
For a question like this, context is important for the community to help. Please post the following:
Until we see those...
The Jira Cloud version of automation's Lookup Issues action supports all issues fields, but the Data Center one does not: https://jira.atlassian.com/browse/JIRAAUTOSERVER-877
If you are using Jira Cloud, I recommend pausing to check the smart value is correct. Smart values are name, spacing, and case-sensitive. When an incorrect one is used, that returns null. To find the correct smart value (or custom field ID) please try this how-to article: https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/
If you are using Jira Data Center, there are two possible workarounds depending upon your rule structure:
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.
And I am getting Success email of issue key with {{key}} from {{#lookupissues}}.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The rule you are showing is in Jira Data Center, not Cloud. This is indicated by the icons in the rule editor and that the audit log shows side-by-side with the rule.
Please see my first post about the limitations of the Lookup Issues action for the Data Center version and workarounds.
As you are only sending an email with the issues, please try the bulk-handling feature of the Scheduled trigger rather than using the Lookup Issues action. With that, you may use the plural {{issues}} smart value.
https://confluence.atlassian.com/automation/run-a-rule-against-issues-in-bulk-993924653.html
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
Thanks for the response. But i have some query in that which i am mentioning below.
I have 3 sections in Automation.
1. "When:Scheduled"
Here I have selected "Process all issues produced by this trigger in bulk" checkbox as per you suggested above. Hope you are talking about that checkbox only?
2. After that i need to add Component. Currently i have "Then:Lookup Issues" where i have JQL query(project="Test Project CM Sandbox" and resolution is EMPTY and "Need By Date(CM=>CXL)" <=7d).
Do i have to add this or anything else? please suggest.
3. And:Send email
where i am using below code and i am getting success email with ticket ID followed by Summary.
----------------------------------------------------------
Below Requests are pending to complete in next 7 Days.
<ul>
{{#lookupIssues}}
<li><a href="{{url}}">{{key}}</a> - {{summary}}</li>{{/}}
</ul>
----------------------------------------------------------
please suggest the code as above for a custom field. That will be helpful.
custom field Name:Customer / Organization
custom field Id: customfield_23401
-----------------------------------------------------------
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For your scenario, the Lookup Issues action is no longer needed and instead the {{issues}} smart value is used.
In the linked documentation I provided, it shows an example rule which exactly matches your case:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Great. It worked!
Thanks @Bill Sheboy for the support.
One more issue i am facing in getting the value for user defined field.
assignee, key and summary system field working fine.
But i have one field in my Project. i.e., "Need by Date"
And i need to include the value for this field too in bulk email.
i tried-
{{Need by Date.value}}
{{customfield_20512.value}}
{{issue.Need by Date}}
{{issue.customfield_20512}}
and some other method. But not working.
Please help me on this too.
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Awesome; I am glad to learn that helped!
To find the correct smart value / custom field id for the "Need by Date" field, please try using this how-to article with an example issue:
https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/
The basic idea is to use a browser tab to call the REST API to load the issue fields, and then search on the page to see how it is available to rules. I suspect only the custom field id will work, so try something like this:
{{#issues}}
* {{key}} -- {{summary}} is assigned to {{assignee.displayName}} and needed by {{customfield_20512}}
{{/}}
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 it is all working! Please consider marking this question as "answered" to 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.
Hello, how are you?
did you tried using this smart value? {{issue.customfield_10001}}
switch the 10001 for the actual id of the field Expected Customer Delivery/Deal Closure Date(CXL=>Customer Production
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have already tried this. Not Working.
And I am getting issue only for user defined field not for System Field.
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.