neos-development-collection icon indicating copy to clipboard operation
neos-development-collection copied to clipboard

BUG: Wrong workspace state after publishing

Open pKallert opened this issue 1 year ago • 4 comments

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

  1. Create a new shared workspace named 'Testing'
  2. Log in using user 'User 1'
  3. Log in in different browser/incognito mode using user 'User 2'
  4. Switch to shared workspace Testing with both users
  5. Change a text element using User 1
  6. Publish changes to workspace 'Testing' using User 1 => Result: workspace of User 1 is 'up to date', workspace of User 2 is 'outdated'
  7. Change a text element using User 2
  8. 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.

pKallert avatar Nov 29 '23 08:11 pKallert

Related problem https://github.com/neos/neos-development-collection/issues/4508

mhsdesign avatar Feb 09 '24 09:02 mhsdesign

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)

bwaidelich avatar Feb 16 '24 10:02 bwaidelich