Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
erp5 erp5
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Labels
    • Labels
  • Merge requests 137
    • Merge requests 137
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedi
  • erp5erp5
  • Merge requests
  • !504

Merged
Created Nov 24, 2017 by Jérome Perrin@jeromeOwner

Do not save documents when there are pending activities

  • Overview 4
  • Commits 13
  • Changes 37

When document has pending activities, we refuse changing ID ( because there might be pending updateRelatedContent activities if I remember correctly ), but it's done in a way that breaks the "atomic" aspect of the transaction a bit, because we

As a result, this happens sometimes that not all properties user changed are modified. In the example below, the change to Include Documents in Site Map is not saved (and also change to ID):

erp5-sorryPendingActivitiesSavePartially

The changed here is to use a field validator that refused editing when there are pending activities, so that user gets a:

erp5-pending-activiities

and the result is either all changes are applied or no change is applied at all.

This is done by:

  • introducing a new my_view_mode_id field in erp5_core's Base_viewFieldLibrary
  • using this field as proxy field of all editable my_id fields. Maybe I forgot some business templates, I changed only the most common ones. I intentionally did not change all fields of erp5_ui_test because I think they are used to compare speed of proxy fields vs traditional fields.

0352f50fd543fda2712bb8ca93d8a8814f975a26 introduces a Zelenium test exercising this new behavior.

Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: fix/edit_activity_pending_error
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7