Skip to content

Implement flash message when editing a default template#5085

Merged
ryancooley merged 1 commit into
developfrom
bugfix/FOUR-9718
Aug 2, 2023
Merged

Implement flash message when editing a default template#5085
ryancooley merged 1 commit into
developfrom
bugfix/FOUR-9718

Conversation

@estebangallego
Copy link
Copy Markdown
Contributor

@estebangallego estebangallego commented Aug 2, 2023

Issue & Reproduction Steps

When editing a default template for the first time, in some cases we will get a json_decode error or Server Error in the nightly build.
Screenshot 2023-08-02 at 12 45 04 PM

  1. Click on Designer->Templates
  2. Click on Edit Template within the Ellipsis menu of one of the Default Templates.
    If the error doesn't show up, click on a different template.

Solution

  • Implement flash message similar to what we have when we create a Process from a Template.

How to Test

  1. Click on Designer->Templates
  2. Click on Edit Template within the Ellipsis menu of one of the Default Templates.
  3. Make sure we don't get an error when editing a template and the flash message is included. (The template was created.)
Screenshot 2023-08-02 at 12 52 37 PM

Related Tickets & Packages

Ticket: FOUR-9718

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

@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, please consider using Session::forget('alert') if it's not necessary to display an alert! This will also fix the issue with the "bad" alert generated in the "connector-send-email" package.

@estebangallego
Copy link
Copy Markdown
Contributor Author

estebangallego commented Aug 2, 2023

Approved, please consider using Session::forget('alert') if it's not necessary to display an alert! This will also fix the issue with the "bad" alert generated in the "connector-send-email" package.

Good point but in this case, I added the alert to reflect the same functionality as what we currently have when creating Processes or Processes from templates.
Example: When we create a Process from a template. or a regular process, we get a flash message saying The process was created.
In this case, I added The template that was created.

@ryancooley ryancooley merged commit 3d1abc2 into develop Aug 2, 2023
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