Skip to content

Fix Interstitial redirecting before a script task is completed#1196

Merged
ryancooley merged 2 commits into4.2.29-developfrom
bugfix/FOUR-5299
Mar 31, 2022
Merged

Fix Interstitial redirecting before a script task is completed#1196
ryancooley merged 2 commits into4.2.29-developfrom
bugfix/FOUR-5299

Conversation

@sanjacornelius
Copy link
Copy Markdown
Contributor

@sanjacornelius sanjacornelius commented Mar 23, 2022

Issue & Reproduction Steps

Fixes Tickets

Reproduce:

  1. Create a process with the next configuration
    image-20220205-044840

  2. Put an interstitial in Form Task

  3. Put a screen display in the end event

  4. Create a request

  5. Route to script to the process finished

Expected behavior:

Insterstitial should wait until the script task is completed.

Actual behavior:

Insterstitial completes BEFORE the script task is executed/completed.

Issue:
The issue was due to emitting the "completed" status of the current task if there was no assigned task to load next. Script tasks are not considered "tasks" that the user has access to, this caused the interstitial to complete before the script task had time to execute or be completed.

Solution

  • Add else if conditional that checks if the process has a parent request via the this.parentRequest variable before emitting the "completed" status if no assigned task is loaded.

How to Test

  1. Test the steps above
  2. Test the subprocess scenarios in this PR

Related Tickets & Packages

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.

Copy link
Copy Markdown
Contributor

@agustinbusso agustinbusso left a comment

Choose a reason for hiding this comment

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

Fixed both tickets FOUR-5299 and FOUR-5806. Also tested the following scenarios:

Screen.Recording.2022-03-25.at.10.43.54.mov
Screen.Recording.2022-03-25.at.10.46.31.mov
Screen.Recording.2022-03-25.at.10.48.55.mov
Screen.Recording.2022-03-25.at.10.51.19.mov
Screen.Recording.2022-03-25.at.10.57.38.mov

There is a known issue (FOUR-5850) not related with this changes. When running a process with a single script task after the script completes, it not redirect to summary.

@sanjacornelius sanjacornelius changed the base branch from develop to 4.2.29-develop March 25, 2022 16:20
@ryancooley ryancooley merged commit be465de into 4.2.29-develop Mar 31, 2022
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.

3 participants