How can I track the number of assignments COMPLETED by a user?
I have a requirement to display a current day report for each user on the dashboard, that shows the following columns:
WB Name | Assignments Completed
where WB Name column has the list of WBs mentioned in the current user's profile and Assignments Completed has the Assignments Completed by the user picked from these wbs.
How can I track when an assignment is completed? As per our application settings, if an assignment gets completed- it is deleted from the Assign- instances.
Other challenge is this cannot be tracked in Finish Assignment activity as we it would also get fired when a user picks a case from a WB and hence it is routed to his WL for processing-here WB assignment(Assign-Workbasket) would get deleted and WL assignment would get created (Assign-Worklist).
Correct me if am wrong.
Also, there are several cases where the user might just route the assigments from one operator to another or WB- but might not actually COMPLETE them by himself.
Please suggest a solution as to how can this be addressed.
Create a Declare Trigger on Assign- Class.Select Trigger when an instance is value as Deleted(As soon as an assignment is complete, it gets deleted). Call an activity which will update the user name to a separate Data Type. That data type should have the operator id and assignment name with both of them as key. So, if we report on the Data Type by operator id, we can find out the count.
I think ArnabGoswami has the right idea. A delete trigger is a good place to start, but you will want to take it a step further to avoid firing when the item is reassigned. I'm not sure if you could look for the assignment on the pxFlow page of the work object to confirm that not only is it being deleted from the database, but also that the work object has moved elsewhere in the flow, but that's where I'd begin to try and figure this out.
I think during transfer and Reassignment the assignment does not get deleted. Hence if the Declare Trigger is fired on Deletion of Assignment, the count should not be taken into consideration in these two cases.