When I delete a workflow state, nodes that currently are in that state become orphaned (ie no current state). This could be by design, but there is no way to get the node to another state afterwards. This renders that node completely unable to use workflow at all. What can I do about this?

CommentFileSizeAuthor
#6 workflow_state_removal.diff2.69 KBJacobSingh

Comments

aaron’s picture

Version: 5.x-1.0 » 5.x-1.1
Category: support » bug

I have the same issue. Seems to be a bug, so I'm marking this issue such. Meanwhile, I'm having to edit the database manually to correct.

aaron’s picture

Title: Deleting workflow states puts nodes in orphaned state » Adding workflow to existing nodes, or deleting workflow states, puts nodes in orphaned state

In addition, if you add a workflow to a node type, any existing nodes will also be orphaned. Makes it fairly difficult to integrate the module into an existing site.

z.stolar’s picture

Same here.
I'm looking for a clean way to apply states to existing nodes of a certain type.
I guess the way to do it (thinking outloud) is to go over the node table, choosing all that type's nodes, and insert them to workflow_node table as the first available state for that type (the one that comes right after creation).

JacobSingh’s picture

Hi Aaron, I don't see this problem. The original bug seems valid, but I added a workflow to an existing node type with dozens of nodes, and it works out of the box as far as I can tell.

z.stolar’s picture

JacobSingh: When you add the workflow, does it's default state applies automatically to all existing nodes? e.g., when you go to the workflow tab of an already existing node - do you see a valid current state?

JacobSingh’s picture

Priority: Normal » Critical
Status: Active » Needs review
StatusFileSize
new2.69 KB

Okay, here is a patch which should resolve this.

I've added a field to the delete confirmation page which allows the user to select a new SID to assign the nodes to. We also zap all history that used the old sid.

JacobSingh’s picture

Hey everyone who commented on this. Please review the patch! I want to put this into a long overdue release, but I really need your help.

Best,
J

jvandyk’s picture

Version: 5.x-1.1 » 5.x-2.x-dev
Status: Needs review » Fixed

Applied code based on patch in #6. Workflow now has state reassignment as part of state deletion if orphaned nodes will result.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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