The new Versioning policy creates a lot of versions. So for example, everytime a different user modifies a document, a version is created.
But the code that versions also decides, for whatever reason, to change the lifecycle state. So, if the document is approved or obsolete, it follows the backToProject transition. See StandardVersioningService#followTransitionByOption:
Big problem here: If this transition does not exist, a modification fails, transation is rolled back, and no change is performed.
We do have several projects where the lifecycle policy is not the default one but still use the commonly approved or obsolete states (DAM-Template demo and all demos derived form this one for example).
So: This code should either:
- Check if (1) The policy is "default", and if not, do nothing, if yes continue
- And+or Check the backToProject transition is available and follows it only if it is the case, do nothing if it's not
- Surround with a try...catch}
- Remove this and don't change the state
- Allow for configuring the behavior (transitions, starting states, etc.)
See also NXP-19679