Repository navigation
FOUR-33773 | Add Out of Office Status and Delegation for Users With Edit Personal Profile Permission - #9098
FOUR-33773 | Add Out of Office Status and Delegation for Users With Edit Personal Profile Permission#9098mcraeteisha wants to merge 7 commits into
Conversation
This change enables self-service profile updates to set a valid delegation user and status values without exposing server-managed fields. The API now restricts editable statuses to the account owner’s allowed set, preserves current admin-assigned values when needed, clears invalid delegation references, and validates delegation ownership and non-system/non-deleted users. The profile editor also sends a filtered payload for self-service edits, and tests cover successful out-of-office delegation updates plus rejection of blocked/scheduled statuses.
PR SummaryMedium Risk Overview Task assignment now substitutes an out-of-office assignee only when the linked replacement is ACTIVE and not deleted ( The profile UI loads settings add-ons with the signed-in user, sends a trimmed payload for self-service saves, and raw execution queries align with the same delegation and soft-delete rules. Reviewed by Cursor Bugbot for commit 41aef59. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
QA server K8S was successfully deployed https://tenant-1.ci-8cc146d8fa.engk8s.processmaker.net |
|
QA server K8S was successfully deployed https://tenant-1.ci-8cc146d8fa.engk8s.processmaker.net |
eiresendez
left a comment
There was a problem hiding this comment.
Approved! I'm just adding a possible edge case but not a blocker, if replacements are required to remain assignable.
Ensure assignments for out-of-office users only resolve to active, valid replacements. This adds active delegation checks and assignee validation to task assignment flows, updates the raw repository queries to ignore soft-deleted/inactive delegation targets, and covers the behavior with regression tests for variable-based task assignment and user delegation rules.
When an assignment resolves to a user who cannot take the task, the token now falls back to the process manager instead of leaving the task unassigned. This also clears stale user relationships before notifying reassignees and adds a feature test covering inactive, out-of-office, and empty replacement cases.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit dc43686. Configure here.
|
QA server K8S was successfully deployed https://tenant-1.ci-8cc146d8fa.engk8s.processmaker.net |
This change restricts delegation assignment validation to non-system, non-deleted, ACTIVE users and clears stale delegation_user_id values for missing, deleted, system, or inactive delegates. It also fixes assignee resolution during escalation so the resolved manager user is used consistently before accepting the final assignee.
|
QA server K8S was successfully deployed https://tenant-1.ci-8cc146d8fa.engk8s.processmaker.net |
|
|
QA server K8S was successfully deployed https://tenant-1.ci-8cc146d8fa.engk8s.processmaker.net |






Issue
Ticket: FOUR-33773
Users with only Edit Personal Profile could set their own status to Active or Inactive. Out of Office and the replacement user (Delegation) were available only on Admin → Users → Edit User, along with Blocked, Scheduled, and Manager.
Edit Profile now offers Out of Office and a replacement picker for the signed-in user. Blocked, Scheduled, and Manager stay on the admin user editor.
Solution
package-advanced-user-manager
delegation_user_idwhen the replacement user is deletedprocessmaker
delegation_user_idwith a personal-profile save, and send only the personal-profile fields for users who are not administrators and do not have Edit Usersdelegation_user_idon a self-service user updateWith no usable replacement (none set, deleted, or not Active), a new task follows the existing empty-Delegation path and goes to the Process Manager, and a reassigned task also goes to the Process Manager. A self-service task stays unassigned. If the process has no Process Manager, the existing "no Process Manager" error is returned, as before. Tasks already moved are not pulled back, and in-progress tasks are not moved when a user goes Out of Office.
How To Test
Automated Tests
phpunit vendor/processmaker/package-advanced-user-manager/tests/Feature/PersonalProfileOutOfOfficeTest.phpphpunit tests/Feature/Api/UsersTest.php --filter testSelfServiceUpdatephpunit tests/Feature/ProfileTest.php --filter testEditProfilePassesSignedInUserToSettingsAddonsphpunit tests/Model/UserTest.php --filter testOnlyAnActiveReplacementCanReceiveADelegatedTaskphpunit tests/Feature/Api/TaskAssignmentByVariableTest.php --filter testOutOfOfficeAssignmentUsesOnlyAnActiveReplacementphpunit tests/Feature/Api/TaskAssignmentTest.php --filter testUnavailableReplacementResolvesToProcessManagerManual Tests
ci:package-advanced-user-manager:task/FOUR-33773
ci:deploy
Code Review Checklist