Skip to content

FOUR-31702 Self-service task with a timer event to complete the request still appears as active - #9080

Open
devmiguelangel wants to merge 6 commits into
developfrom
FOUR-31702
Open

devmiguelangel wants to merge 6 commits into
developfrom
FOUR-31702

Conversation

@devmiguelangel

@devmiguelangel devmiguelangel commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Issue & Reproduction Steps

An interrupting boundary timer closes an unclaimed self-service task. The task retains its historical is_self_service = 1 flag, but it must disappear from active Self Service results and must not be labeled Self Service in historical charts.

Solution

  • Do not clear is_self_service, claim/reassign the task, or populate completed_at when an activity closes.
  • Keep the active-list contract query-side: available self-service tasks require status = ACTIVE, remain unassigned, and preserve user/group/manager eligibility. Reuse this predicate for user-ID and assignment-scope listings; the no-auth semantic Self Service query also requires ACTIVE.
  • Preserve raw is_self_service = 1 PMQL semantics for historical/diagnostic searches. The semantic status = "Self Service" filter is the active-availability filter.
  • Add regression coverage for interrupting/non-interrupting timers, closure while the request continues, retained assignment state, active semantic listing versus raw flag query, and assigned historical tasks.

Verification

  • Manual tests were run by the author; all are green.
  • PHP syntax and diff checks pass. No automated test suite was run as part of this change.

Related Tickets & Packages

FOUR-31702
Saved Search PR #701

Code Review Checklist

  • I have pulled this code locally and manually tested it on my instance, along with the associated package.
  • This code includes regression tests for the changed behavior.
  • This code adheres to ProcessMaker Coding Guidelines.
  • This solution does not alter expected process behavior or introduce breaking changes.
  • Enterprise package compatibility and PRD requirements have been verified.

ci:package-savedsearch:FOUR-31702
ci:deploy

@devmiguelangel devmiguelangel self-assigned this Sep 28, 2026
@cursor

cursor Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

PR Summary

Medium Risk
Changes shared task-query paths (PMQL Self Service, user_id filter, whereUserAssigned) that drive inbox and saved searches; behavior is narrower but could surprise consumers relying on closed tokens with is_self_service still listed.

Overview
Fixes closed unclaimed self-service tasks still appearing as active when task lists, PMQL, and user filters treat anything with is_self_service = 1 as self-service.

PMQL/advanced Self Service status now requires ACTIVE, unassigned tokens when there is no logged-in user (not only is_self_service). scopeWhereUserAssigned and the tasks API user_id filter no longer inline-match self_service_groups JSON; they orWhereIn token IDs from User::availableSelfServiceTasksQuery(), so closed self-service work drops out while normal assigned (including closed) tasks stay visible.

Adds boundary-timer + self-service feature tests, a BPMN fixture, and filter/API coverage for the new rules.

Reviewed by Cursor Bugbot for commit 6a8f299. Bugbot is set up for automated code reviews on this repo. Configure here.

@vladyrichter

Copy link
Copy Markdown

QA server K8S was successfully deployed https://tenant-1.ci-37fb4aefb9.engk8s.processmaker.net

Comment thread ProcessMaker/Repositories/TokenRepository.php Outdated
@decisions-sonarqube

Copy link
Copy Markdown

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.

3 participants