Delayed approvals on Changes/Qualities can slow down production, create inefficiencies, and waste time. This article will walk through setting up a report that shows how many days a Change/Quality has been waiting for approval.
A. Create 'Duration from Today' field on Change Phase
- Go to Setup > Object Manager > Change Audit Trail > Fields and Relationships
- Click New
- Set Data Type to Formula
- Set Field Label as 'Duration from Today' (Field Name should auto-populate), Return Type as Number (decimal places set to 0)
- Set formula to: (DATETIMEVALUE(Today()) - PDLM__Created_DateTime__c) + 1
- This provides the duration in days (the one offsets the date difference). Add a "1440" multiplier to change the duration unit to minutes.
- Click Next, and then Save.
- Don't forget to add this field to your custom field permission sets!
B. Create Report(s)
- Head over to the Reports tab, select New Report
- Select the Report Type "Change/Quality Audit Trail with Change/Quality" (depending on what you want to report on.)
- You'll now find yourself at the Report Creator page. We'll start by removing the Change Audit Trail: Change History Name column.
- Then add the following columns:
- Created DateTime
- Duration from Today
- Move over to the Filters tab, and update to the following:
- Change the Change Audit Trail filter to 'All change audit trail'
- Add filter for Change: Status to equal your required approval phase (i.e. In Approval)
- Add filter for NewValue, set to the approval phase (i.e. In Approval)
- Add filter for Field, set the value to 'PDLM__Status_lk__c'
- Now group by Change: Change Number
Your reports will now provide the duration from today for each Approval phase on each Change.