Problem/Motivation

When opening a form in a workspace, that workspace should be active until the form is submitted.

Steps to reproduce

- Activate a workspace and open the node add form
- Open a new tab and activate another workspace
- Go back to the initial tab, fill and submit the form
- Observe that the node is tracked by the second workspace instead of the initial one

Proposed resolution

Ensure that the initially active workspace is persisted through the entity lifecycle of the form.

Remaining tasks

Review.

User interface changes

Nope.

Introduced terminology

N/A

API changes

API addition with BC:
- A new optional argument ($persist = TRUE) is added to WorkspaceManagerInterface::setActiveWorkspace()

Data model changes

N/A

Release notes snippet

N/A

CommentFileSizeAuthor
#15 3525642-nr-bot.txt91 bytesneeds-review-queue-bot

Issue fork drupal-3525642

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

amateescu created an issue. See original summary.

amateescu’s picture

Status: Active » Needs review
smustgrave’s picture

Status: Needs review » Needs work

Appears to have a number of test failures.

amateescu’s picture

Status: Needs work » Needs review

No more test failures :)

smustgrave’s picture

Status: Needs review » Needs work

Think there may have been a rebase issue?

amateescu’s picture

Status: Needs work » Needs review

@smustgrave, not sure why you think so, the MR was applying just fine. Merged the latest 11.x though just in case.

smustgrave’s picture

Status: Needs review » Needs work

So why are the changes to the gitlab file, link module, file discovery, etc needed?

Like its merging in other stuff

amateescu’s picture

Status: Needs work » Needs review

Oops, I wasn't looking at the changes tab. Not sure what happened there but I couldn't do anything with that branch so I opened a new MR instead.

smustgrave’s picture

Status: Needs review » Needs work
Issue tags: +Needs change record

Since this is an API change probably needs a CR

amateescu’s picture

Status: Needs work » Needs review
Issue tags: -Needs change record

Added a CR.

needs-review-queue-bot’s picture

Status: Needs review » Needs work
StatusFileSize
new91 bytes

The Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".

This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

amateescu’s picture

Status: Needs work » Needs review
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

CRs seem fine to me. Believe all feedback has been addressed here

  • catch committed 339eba4a on 11.2.x
    Issue #3525642 by amateescu, smustgrave: The active workspace is not...

  • catch committed 2468273f on 11.x
    Issue #3525642 by amateescu, smustgrave: The active workspace is not...
catch’s picture

Version: 11.x-dev » 11.2.x-dev
Status: Reviewed & tested by the community » Fixed

When I look at this I keep thinking there must be a better way to do it, but I don't think one exists - e.g. it might be good if we could make ajax_page_state extensible and put other things in there that always have to be passed around to various AJAX requests but it's not. Given this is self-contained in the workspaces module, going to go ahead and commit this and if a centralised way shows up later we can eventually convert over to that.

Committed/pushed to 11.x and cherry-picked to 11.2.x, thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.