I want to create an automation with a user condition. See below:
I want the condition to check if Reporter = Approver. I am, however, not sure how to add alternatives to the drop down list. The dropdown list seems to be a mix between standard values and manually added value, but I tried to create a value and it does not show up (It is a People-Field)
This is how the dropdown look
I do not need a manually created value if I can access the "official" Approvers field but none of the alternatives in the list seemed to work.
Anyone have an idea what the problem might be here?
If an issue is pending approval, then the special "Approvals" field tells you who can approve a request.
If you retrieve an issue via the REST API, as suggested by https://support.atlassian.com/jira-software-cloud/docs/find-the-smart-value-for-a-field/ the Approvals field looks like this:
"customfield_10100": [ { "id": "1", "name": "Waiting for approval", "finalDecision": "pending", "canAnswerApproval": false, "approvers": ["approver":jiraUser,"approvalDecision":"pending"], "createdDate": { "iso8601": "2021-06-07T12:41:16+1000", "jira": "2021-06-06T21:41:16.299-0500", "friendly": "Monday 12:41 PM", "epochMillis": 1623033676299 }, "_links": { "self": "https://are-media.atlassian.net/rest/servicedeskapi/request/43862/approval/1" } } ],
Try an advanced compare condition like:
First value: {{#issue.Approvals}}{{if(equals(finalDecision,"pending"),approvers)}}{{/}}
contains
Second value: {{issue.reporter}}
Thank you for the response.
I got a this error when I tried to publish the rule
Error parsing template: Failed to close 'issue.Approvals' tag
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I removed the # and then I was able to publish it, but I got this error message when I tested the rule
Error rendering smart-values when executing this rule:Failed to get value for if(equals(finalDecision,"pending"),approvers){{/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Daniel.AderstegThis is a tricky expression and I made a syntax error in not closing the braces on the if statement. I've corrected the statement above, and made bold where I did the error. Spend enough time staring at Smart Values and your eyes go a little cross-eyed, but it's better than the alternative!
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.