Displaying approval and approvers of issues

Hi,
I want to show for issues, the people who approved/declined them. How do I go about doing that?
I saw issue property “Issue Approvers”, but it just shows up as “none” values. (see screenshot)

Thanks

1 Like

Hi @Meytal-BM,

Based on the info provided, I would suggest figuring out if the approval is correctly implemented in the underlying issue workflow.
When that’s confirmed, check if the Approvers are correctly filled in on issue level in Jira.

Hope that helps,
Steven

Hello @Meytal-BM

Unfortunately eazyBI cannot access the approver information, you can read more here How to pull approval and approvers from the issues - #2 by MaheshwarReddy

We do have a ticket in our backlog regarding this and I have added your vote to it.

Best wishes,

Elita from support@eazybi.com

Hi @Elita.Kalane thanks, but in the link you send to the JavaScript how-to, doesn’t say anything on how i retrieve approvers. Can you point me to the right place? thanks

Hello @Meytal-BM

Apologies for the delayed response. If you are on cloud, you could try using the code below, but you should adjust it according to your settings. Replace NNNNN with the ID of your approval custom field ID. And replace the status in this line
if(item.name == ‘To Do’ && item.finalDecision == ‘approved’) with the status you have defined is a trigger for the ticket to be sent for approval.

[jira.customfield_eazybiapprovers]
name = "Approved by"
data_type = "string"
multiple_values = true
split_by = ","
dimension = true
json_fields = ['customfield_NNNNN']
javascript_code = '''
if (issue.fields. customfield_NNNNN){
    var approvals = issue.fields. customfield_NNNNN;
    for(item of approvals){
        if(item.name == 'To Do' && item.finalDecision == 'approved'){
            for(user of item.approvers){
                if(user.approverDecision == 'approved'){
                    return issue.fields.customfield_eazybiapprovers = user.approver.displayName;
                }
            }
        }
    }
}

'''

Best wishes,

Elita from support@eazybi.com