Hi.
I am using lookupIssues functionality to do automation. I can't get customfield value to display in email automation.Is there any workaround to do the same..Afaik we can't get customfield value as per jira Data center limitation. Any help would be much appreciated
Thanks
Hi @[deleted]
Custom fields are not yet supported for Lookup Issues with Jira Server / Data Center. Here is the suggestion to add those: https://jira.atlassian.com/browse/JIRAAUTOSERVER-877
For some background, when Lookup Issues was first added for Jira Cloud, it also only supported about a dozen fields. About a year later, all of the other fields were added. Perhaps the same will happen for the non-Cloud versions.
As a work-around, you could call the REST API issue search with JQL, using the Send Web Request action, and that will probably include all of the fields.
Kind regards,
Bill
@Bill Sheboy Thanks..yes I am aware of the limitations..Thanks for the workaround..I got 5 issues from lookup and I want to mention them in email content..how to make use of rest API for each issue..I think we don't have options to iterate through lookup issues to find info for a each and every issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
When using Send Web Request this way, the response contains the issues with their fields, the same as with Lookup Issues and so may be iterated over. The difference is referencing the {{webhookResponse}} rather than {{lookupIssues}}
Please look see this how-to article for calling the Jira REST API functions from a rule:
Depending upon which function you call, the response will be different. I recommend writing a test rule to call the REST API function, and writing the response to the audit log. That will show the structure to help iterate over it in the email.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Bill Sheboy Thanks..I have 4 issue filtered out by jql and I want to send them in single email with customfield value. Webhook is sending into 5 different email.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Would you please post an image with your complete rule and of the audit log details showing the rule execution?
Until we see that...
I suspect your rule is trying to branch over the issues, rather than using the webhook response as a set of issues for the email.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Bill Sheboy Not sure I am getting it..I am very new to jira :(. Is it possible to share the flow to implement to have a try.
When :Scheduled every 1 days
Then Lookup issues
Search for issues using JQL
project=test
And Send Web Request
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please try adjusting to this, without the lookup issues action (if you need the custom fields)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Bill Sheboy Thanks..I was able to move till condition and response was 200.
I printed {{webhookResponse.body}} in log action.
Log action
Log
Test: {expand=schema,names, startAt=0, maxResults=50, total=2, issues=[{expand=operations,versionedRepresentations,editmeta,changelog,renderedFields, id=83503, self=https://jira.testserver.com/rest/api/latest/issue/83503, key=PM-109}, {expand=operations,versionedRepresentations,editmeta,changelog,renderedFields, id=58076, self=https://jira.testserver.com/rest/api/latest/issue/58076, key=PM-107}]}
Associated items:
None
I am not able to print data from webhookResponse.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have you tried iterating over the issues, such as with this:
{{#webhookResponse.body.issues}}
access your fields by the smart values
{{/}}
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.
Once inside of an iterator, do not add the issue prefix as the scope is the iterator (not a single issue).
{{#webhookResponse.body.issues}} {{key}} {{/}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Bill Sheboy Thank you...what about customfield value...will it be customfield_198.value
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This depends upon the field type...
I am using Jira Cloud, and not Server / Data Center, so please check your field type and attributes to confirm them. This how-to article can help with that: https://confluence.atlassian.com/automation/find-the-smart-value-for-a-field-993924665.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Bill Sheboy Thank you so much...yes I was able to figure out that .since it's drop down then I had to get using value .I really appreciate your support 🙏
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @[deleted]
Welcome to the community.
Which limitation do you mean?
This format is used to get custom field value: {{issue.customfield_xxxxx}}
If you mean something different, please share more details.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you. Here is the snippet and it works well except customfield
<ul>
{{#lookupIssues}}
<li><a href="{{url}}">{{key}} -{{fixVersions.name}}</a> - {{summary}} -{{status.name}} -{{customfield_16961.value}}</li>{{/}}
</ul>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
it would be great to see a screenshot of your rule. Please include details of the given components where you are struggling.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you..I am using this.
<ul>
{{#lookupIssues}}
<li><a href="{{url}}">{{key}} -{{fixVersions.name}}</a> - {{summary}} -{{status.name}} -{{customfield_16961.value}}</li>{{/}}
</ul>
Other than customfield everything works and I can see in log action.
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.