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?
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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]")
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No, that's not acceptable, we need 1) remind every day 2) auto-decline on overdue
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.
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.
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.