neos-development-collection
neos-development-collection copied to clipboard
BUG: Wrong workspace state after publishing
Is there an existing issue for this?
- [X] I have searched the existing issues
Current Behavior
When a user has an outdated workspace and publishes their workspace to a shared workspace, the user's workspace status is automatically switched to 'up-to-date', even if it was 'outdated' before the switch. With the way it currently is, the new 'rebase workspace button' and the normal 'publish to workspace' button have the same outcome, at least from the user's viewpoint.
Expected Behavior
I would expect the editor to not be able to update their workspace to 'up to date' just by publishing their changes. As far as I understood, a workspace should only be up to date after rebasing? I am unsure if there is a nice solution here since requiring rebasing the workspace for every change an editor does in the shared workspace seems very annoying from the user's point of view.
Steps To Reproduce
- Create a new shared workspace named 'Testing'
- Log in using user 'User 1'
- Log in in different browser/incognito mode using user 'User 2'
- Switch to shared workspace Testing with both users
- Change a text element using User 1
- Publish changes to workspace 'Testing' using User 1 => Result: workspace of User 1 is 'up to date', workspace of User 2 is 'outdated'
- Change a text element using User 2
- Publish changes to workspace 'Testing' using User 2 => Result: workspace of User 2 is now changed from 'outdated' to 'up to date', workspace of user 1 is 'outdated'
Environment
- Flow: 9
- Neos: 9
- PHP: 8.2
Anything else?
In the projection the workspace status is just switched around, regardless of the current status: https://github.com/neos/neos-development-collection/blob/207a86d9025ff26c669c678f11e75463075e213f/Neos.ContentRepository.Core/Classes/Projection/Workspace/WorkspaceProjection.php#L222
see also discussion here: https://neos-project.slack.com/archives/C3MCBK6S2/p1700236382252689
I tested locally with https://github.com/neos/neos-development-collection/pull/4692 and the problem still persists.
Related problem https://github.com/neos/neos-development-collection/issues/4508
It would be really helpful to create Behat tests that reproduce the bug (in this case probably: it must not be possible to publish an outdated workspace)