Can't get Approvers via Smart Values in Jira Automation

Kruno
Contributor
October 20, 2022

Hey there,

I am trying to create an automation which removes a certain user from the Approvers list.

I know how to remove the user itself but while testing it I realised that I am not able to show the values of the Approvers list. I tried the following below but also to access the values with .get(0) and also specific Approver values like .displayName.

 

Screenshot 2022-10-20 at 13.57.52.pngsimply leads to

Screenshot 2022-10-20 at 13.57.48.png

Maybe anyone having a clue?

 

Cheers

Kruno

2 answers

1 vote
Dirk Ronsmans
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 20, 2022

hey @Andie Duframe ,

Have you tried:

{{issue.Approvers}} to see what's in there?

 

Kruno
Contributor
October 20, 2022

Yep, it's still empty

Dirk Ronsmans
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 20, 2022

Have you also tried using the {{issue.customfield_xxx}} method to get the data?

Also, when are you filling this Approvers field? Is it already filled in advance or in the same automation?

If this is in the same automation you'll have to add a refetch data action.

Dirk Ronsmans
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 20, 2022

I just tried it on a rule myself. (after adding the approver manually before I run the manual automation)

 

image.png

 

Seems to return the useraccount id without any issues..

Kruno
Contributor
October 21, 2022

Hey @Dirk Ronsmans 

THX for all the effort.

1. Yes I am filling it in the same rule BUT this isn't the issue as in a next step I change the value (I remove an approver) and it works

2. Yep tried also with he customfield_ pattern

Dirk Ronsmans
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 24, 2022

Have you tried the use case where you add the "refetch data" action before your action?

Some things take time on the backend so it  could be that in your later actions the field is populated but at that time not yet.

The refetching will get the up to date information for the rest of your automation to work with

Like Florian Bonniec likes this
0 votes
Florian Bonniec
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 20, 2022

Hi @Andie Duframe 

Have you try using the customfield id instead of the name ? Had similar issue with some fields when there is duplicate names on the instance or buggy due to my jira language that is not in English.

 

On my side this return the username that are approvers

{{issue.customfield_10120}}

This on approvers displayname

{{issue.customfield_10120.displayName}}

On my side customfield_10120 is the field id of approvers.

Automation will apply the displayName to every value in the fields, it seems to know that the field return an array.

 

Regards

Kruno
Contributor
October 21, 2022

Hey @Florian Bonniec 

yeah I did try it with customfield_* too but no luck

Florian Bonniec
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 21, 2022

Have you try to run the issue fetch action before the log action?

Can you share the automation you are using and the automation version?

On my side it works with the latest version.

 

Regards 

Kruno
Contributor
October 21, 2022

I try to keep it short but basically what I am doing and why.

- we need to set approvers for the Service Desk approval workflow based on the customer request type

- this is in place and works

- at the same time we need to ensure that the reporter is not an approver so I remove  em et the end

- as a step before I wanted to check if the Reporter is an approver, this check is not necessary so I removed it currently as this is what the issue here is based on

Jira Automation for Data Center version 8.0.0

 

A Screenshot of the rule, the details of the Approvers Log is visible in my initial post

Screenshot 2022-10-21 at 14.12.42.png

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events