Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to remind to approve issues?

Kirill Skachkov April 17, 2019

I wish to remind approvers to make a decision every day by e-mail or slack, if user still don't response within one week - auto-decline issue with comment. For that I add SLA called "Time to approve" (40h in status) and automation rule with auto-decline.

That should do the trick with approval overdue, but how to set up every-day reminder to users with pending approvals?

4 answers

0 votes
Phong Nguyen - Atlassian Solutions Engineer
Contributor
June 15, 2023

If anyone is interested, I created a Jira automation approach here to handle this case: https://community.atlassian.com/t5/Jira-discussions/How-to-remind-all-approvers-by-Slack-that-have-pending-approval/td-p/2390360

0 votes
Kirill Ilinich April 17, 2019

There is a way with scriptrunner and escalation service but there is a problem to get list of approvers with no decision. Code is not working in Jira 8 anymore and I don't fix it yet.

Kirill Ilinich April 17, 2019

Yes. That's what I need.

import org.apache.log4j.Logger
import org.apache.log4j.Level
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.servicedesk.api.approval.ApprovalService
import com.onresolve.scriptrunner.runner.customisers.WithPlugin
@WithPlugin("com.atlassian.servicedesk")
logs = Logger.getLogger("com.acme.customListener")
logs.setLevel(Level.DEBUG)

def issue = ComponentAccessor.getIssueManager().getIssueObject("DVPS-7011") // console testing

def robotUser = ComponentAccessor.getUserManager().getUserByKey("robot-manager")
def approvalService = ComponentAccessor.getOSGiComponentInstanceOfType(ApprovalService)
def approvalQuery = approvalService.newQueryBuilder().issue(issue.id).build()
def approvalOpt = approvalService.getApprovals(robotUser, approvalQuery).findFirst()
if (approvalOpt.isPresent() && !approvalOpt.get().getDecision().isPresent()) {
def approvalsNeeded = approvalService.getApprovers(robotUser, approvalOpt.get()).findAll{!it.getApproverDecision().isPresent()}.collect{it.getApproverUser().name}
logs.info("Approvals needed: $approvalsNeeded")
//
// Remind to approve
//
} else {
logs.info("No pending approvals found for issue [$issue.key]")
}

 

Like Rickard Hyllenstam likes this
0 votes
Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 17, 2019

What I recommend is to use a recursive transition back into the approval status which is triggered using automation. Here is a thread that discusses this - Service-Desk-Reminder-for-pending-approval

Kirill Ilinich April 17, 2019

No, that's not acceptable, we need 1) remind every day 2) auto-decline on overdue

0 votes
Tarun Sapra
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 17, 2019
Kirill Ilinich April 17, 2019

There is no solution for my case (and there is no accepted answers in linked questions). 

I have few approvers and I want only send reminder to those who did't answer. SLA-breach and additional step would not help.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events