Skip to content

FOUR-8446 - Trigger autosave when clicking Close#4745

Merged
ryancooley merged 5 commits into
developfrom
bugfix/FOUR-8446
May 5, 2023
Merged

FOUR-8446 - Trigger autosave when clicking Close#4745
ryancooley merged 5 commits into
developfrom
bugfix/FOUR-8446

Conversation

@eiresendez
Copy link
Copy Markdown
Contributor

@eiresendez eiresendez commented May 4, 2023

Issue & Reproduction Steps

When there are changes and the Close button is clicked displays a popup alert that prevents it from closing.

  1. Drag any element into modeler, screen designer, scripts builder or make any change.
  2. Click close before the 5 seconds autosave delay.

Expected behavior:
When the Close button is clicked, it should auto-save and then redirect without showing the alert popup.

Solution

  • When the Close button is clicked, the leave warning is disabled, autosave is executed, and then redirect is performed.

NOTES for other future scenarios:

  • It may be challenging to implement the same behavior when clicking on an href link such as "Designer, Admin, Request, etc." because the browser immediately aborts the axios call (or maybe I just followed a bad approach :).
  • Immediate Autosaving was not attempted when the browser or tab is closed. The behavior will be the same as showing the leave-warning.
Screen.Recording.2023-05-04.at.5.35.33.p.m.mov

How to Test

Follow the steps of above.

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.

ci:deploy

@pmkerberos
Copy link
Copy Markdown

QA server was successfully deployed https://ci-d6f4366cca.eng.processmaker.net

@pmkerberos
Copy link
Copy Markdown

QA server was successfully deployed https://ci-d6f4366cca.eng.processmaker.net

1 similar comment
@pmkerberos
Copy link
Copy Markdown

QA server was successfully deployed https://ci-d6f4366cca.eng.processmaker.net

@pmkerberos
Copy link
Copy Markdown

QA server was successfully deployed https://ci-d6f4366cca.eng.processmaker.net

@eiresendez eiresendez changed the title FOUR-8446 - Trigger autosave when clicking Close - Modeler FOUR-8446 - Trigger autosave when clicking Close May 5, 2023
@pmkerberos
Copy link
Copy Markdown

QA server was successfully deployed https://ci-d6f4366cca.eng.processmaker.net

3 similar comments
@pmkerberos
Copy link
Copy Markdown

QA server was successfully deployed https://ci-d6f4366cca.eng.processmaker.net

@pmkerberos
Copy link
Copy Markdown

QA server was successfully deployed https://ci-d6f4366cca.eng.processmaker.net

@pmkerberos
Copy link
Copy Markdown

QA server was successfully deployed https://ci-d6f4366cca.eng.processmaker.net

@pmkerberos
Copy link
Copy Markdown

QA server was successfully deployed https://ci-d6f4366cca.eng.processmaker.net

@ryancooley ryancooley merged commit 7d2b532 into develop May 5, 2023
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