FOUR-13834 | The Modified Date in Projects Isn’t Updated After Making Changes to the Project by mcraeteisha · Pull Request #6124 · ProcessMaker/processmaker

Issue

Ticket: FOUR-13834

After adding assets to a project, removing assets from a project, or duplicating assets within a project, the 'Modified' date is not updated in the Projects Listing.

Solution

Add a method to the ProjectAssetTrait.php file called updateProjectUpdatedAt. This method updates the updated_at database field for projects. The method is called within the syncProjectAssets function, as many project assets utilize this function when they are updated. For any endpoints where project assets are being updated, but the syncProjectAssets method is not being called, the updateProjectUpdatedAt method is called directly in that asset's controller.

How to Test

  1. Go to branch observation/FOUR-13834 in processmaker.
  2. Go to branch observation/FOUR-13834 in package-projects.
  3. Go to branch observation/FOUR-13834 in package-ai.
  4. Go to Designer → Projects. Create and open a Project.
  5. Add an existing Process to the Project.
    • Ensure that the 'Modified' date updates in the Project Listing.
    • Repeat for all other assets.
  6. Create a new Process within the Project.
    • Ensure that the 'Modified' date updates in the Project Listing.
    • Repeat for all other assets.
  7. Duplicate a Process within the Project.
    • Ensure that the 'Modified' date updates in the Project Listing.
    • Repeat for all other assets.
  8. Delete a Process from the Project.
    • Ensure that the 'Modified' data updates in the Project Listing.
    • Repeat for all other assets.

ci:next
ci:package-projects:observation/FOUR-13834
ci:package-ai:observation/FOUR-13834

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.