Field Staff Tracking
Mobile Attendance
Pending Task Restriction

Pending Task Restriction

The pending task restriction is a business enforcement mechanism that blocks immediate attendance posting if the staff member has unresolved work items. This ensures field staff address their pending obligations before their attendance is confirmed.

Task Check Flow

Pending Task Categories

CategoryMethodExample
Follow-up CallsGetFollowupCallsCountForAttendanceRestrictionByUserId3 pending call follow-ups
Follow-up ApprovalsGetFollowupCallsApprovalCountForAttendanceRestrictionByUserId2 pending call follow-up approvals
Attendance ApprovalsGetMobileAttendanceByDateForApprovalCountByUserId1 pending attendance approvals
Overdue TasksGetOverDueTaskCount5 pending tasks
Pending WorkflowsGetPendingWorkflowCount2 pending workflow items
SV Pickup PendingGetSVPickupPendingCount1 pending pickup
Uncompleted SVGetUncompletedSVCount3 pending status of SV

Reason String Construction

When pending tasks exist, the system constructs a human-readable reason string by concatenating all non-zero categories:

"3 pending call follow-ups, 2 pending call follow-up approvals, 5 pending tasks"

This string is stored on the punch timing record via PunchTimingsBO.UpdateReason() and used by the background processor to determine when to finalize attendance.

User-Facing Message

The mobile app displays this message when tasks are pending:

Your on duty is noted. But attendance will be considered, only after closing pending tasks within 20 minutes.

This gives the staff member a 20-minute window to clear their pending items before the attendance decision is made by the background processor.

API Endpoints for Task Counts

These endpoints are also exposed via the AttendanceAPIController for the mobile app to query independently:

EndpointMethodReturns
GetMobileAttendanceApprovalCount/{UserId}GETPending attendance approval count
GetFollowupCallsCountForAttendanceRestriction/{UserId}GETPending follow-up calls count
GetFollowupCountForAttendanceRestriction/{UserId}GETPending follow-up approvals count
GetAttendanceRestrictionForUser/{UserId}GETFull list of restriction reasons