Skip to content

fix: use background job to bulk mark attendance for more than 10 records (backport #4239)#4245

Open
mergify[bot] wants to merge 3 commits intoversion-15-hotfixfrom
mergify/bp/version-15-hotfix/pr-4239
Open

fix: use background job to bulk mark attendance for more than 10 records (backport #4239)#4245
mergify[bot] wants to merge 3 commits intoversion-15-hotfixfrom
mergify/bp/version-15-hotfix/pr-4239

Conversation

@mergify
Copy link
Copy Markdown
Contributor

@mergify mergify bot commented Mar 19, 2026

Bulk mark attendance tool doesn't impose any limit on the number of dates a user can select to mark attendance. But it also tries to save all those records in a single request.

Screencast.From.2026-03-18.16-33-19.mp4

While this use is extreme, what is more common is user customisation causing saving of records to slow down and multiple users trying to mark attendance simultaneously which makes them run into deadlocks and timeouts.

Now less than 10 records are processed inside the http request, any more than, that are handed over to a background job that keeps committing in batches.

Screencast.From.2026-03-18.16-28-03.mp4

Summary by CodeRabbit

Release Notes

  • Improvements
    • Bulk attendance marking now processes asynchronously in the background when marking 10 or more days, providing faster user response.
    • Improved error resilience: bulk operations continue processing even when encountering duplicate or overlapping shift attendance records.

This is an automatic backport of pull request #4239 done by [Mergify](https://mergify.com).

(cherry picked from commit acf41ea)

# Conflicts:
#	hrms/hr/doctype/attendance/attendance.py
#	hrms/hr/doctype/attendance/attendance_list.js
#	hrms/hr/doctype/attendance/test_attendance.py
(cherry picked from commit cf1951c)

# Conflicts:
#	hrms/hr/doctype/attendance/attendance.py
@mergify mergify bot requested a review from ruchamahabal as a code owner March 19, 2026 12:23
@mergify mergify bot added the conflicts label Mar 19, 2026
@mergify
Copy link
Copy Markdown
Contributor Author

mergify bot commented Mar 19, 2026

Cherry-pick of acf41ea has failed:

On branch mergify/bp/version-15-hotfix/pr-4239
Your branch is up to date with 'origin/version-15-hotfix'.

You are currently cherry-picking commit acf41ea80.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   hrms/hr/doctype/attendance/attendance.py
	both modified:   hrms/hr/doctype/attendance/attendance_list.js
	both modified:   hrms/hr/doctype/attendance/test_attendance.py

no changes added to commit (use "git add" and/or "git commit -a")

Cherry-pick of cf1951c has failed:

On branch mergify/bp/version-15-hotfix/pr-4239
Your branch is ahead of 'origin/version-15-hotfix' by 1 commit.
  (use "git push" to publish your local commits)

You are currently cherry-picking commit cf1951cd2.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   hrms/hr/doctype/attendance/attendance.py

no changes added to commit (use "git add" and/or "git commit -a")

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant