Skip to content

CMFActivity adapt hasErrorActivity to modern API

Łukasz Nowak requested to merge luke/erp5:fix/hasErrorActivity into master

ActiveObject and ActiveProcess provide hasErrorActivity method, which shall return True only in case when there is errornous activity related to given document (be it object or process).

Unfortunately those methods weren't tested and because of obsoletion of processing_node parameter, they were failing.

This MR provides:

  • addition of invalid_only parameter, which allows to check if there is any message which is failed (and failed is -2)
  • test covering various cases for hasActivityError
  • fix for hasErrorActivity using the invalid_only parameter
  • small reorganisation of global, which is not needed in ActiveObject anymore

Attached testCMFActivity.txt contains test result of testCMFActivity.py from source branch.

Merge request reports