Skip to content

FOUR-13834 | The Modified Date in Projects Isn’t Updated After Making Changes to the Project #6124

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 1, 2024

Conversation

mcraeteisha
Copy link
Contributor

@mcraeteisha mcraeteisha commented Jan 30, 2024

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.

Copy link

Copy link
Contributor

@estebangallego estebangallego left a comment

Choose a reason for hiding this comment

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

Approved!

@ryancooley ryancooley merged commit c386cf4 into next Feb 1, 2024
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