Skip to content

bugfix/FOUR-30846: Completed tasks can be reassigned.#8798

Open
CarliPinell wants to merge 1 commit intodevelopfrom
bugfix/FOUR-30846
Open

bugfix/FOUR-30846: Completed tasks can be reassigned.#8798
CarliPinell wants to merge 1 commit intodevelopfrom
bugfix/FOUR-30846

Conversation

@CarliPinell
Copy link
Copy Markdown
Contributor

Solution

  • Reassign button is now disabled when task status is Completed or Closed.

How to Test

  • Login PM 4
  • Run a Case from begin to end
  • When process is completed, go to tasks
  • Select a Completed process and open Preview Window
  • Reassign button must be disabled.

Related Tickets & Packages

https://processmaker.atlassian.net/browse/FOUR-30846

Code Review Checklist

  • I have pulled this code locally and tested it on my instance, along with any associated packages.
  • This code adheres to ProcessMaker Coding Guidelines.
  • This code includes a unit test or an E2E test that tests its functionality, or is covered by an existing test.
  • This solution fixes the bug reported in the original ticket.
  • This solution does not alter the expected output of a component in a way that would break existing Processes.
  • This solution does not implement any breaking changes that would invalidate documentation or cause existing Processes to fail.
  • This solution has been tested with enterprise packages that rely on its functionality and does not introduce bugs in those packages.
  • This code does not duplicate functionality that already exists in the framework or in ProcessMaker.
  • This ticket conforms to the PRD associated with this part of ProcessMaker.

@processmaker-sonarqube
Copy link
Copy Markdown

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

Copy link
Copy Markdown
Contributor

@eiresendez eiresendez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 👍 approved with just minor comments!

return false;
}
if (typeof status === "string") {
if (status === "CLOSED" || status === "Completed") {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 Improvements
resources/js/tasks/components/TasksPreview.vue:292
isTaskCompleted() mixes canonical API/DB state with UI display values: CLOSED, Completed, and rendered badge HTML/CSS classes.

Reasoning: CLOSED is the real task status. Completed is a UI label/alias and can be translated or absent depending on where the task object comes from. Parsing badge classes is also fragile.

Suggestion: if the frontend needs a visual disabled state, use a canonical field only, such as task.status === "CLOSED" or task.advanceStatus === "completed". Do not rely on translated labels or rendered HTML.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants