Ticket #9031 (closed Bug: fixed)

Opened 6 years ago

Last modified 5 years ago

little improvement in workflow update for plone.app.controlpanel

Reported by: fmoret Owned by: mj
Priority: minor Milestone: 3.3.5
Component: General Version:
Keywords: TuneUp22 forcommit Cc: hoss, grahamperrin@…

Description

I encounter a problem while updating the workflow with plone.app.controlpanel I tried to move from a old to a new workflow (different names) by changing it in the "default" field. I choosed the corresponding workflows states and all my content went to "private" state.

After investigations I fixed it by adding on line in plone.app.controlpanel.types.py

line 148 >>> wt.setChainForPortalTypes(type_ids, wt.getDefaultChain()) before wt.setDefaultChain(','.join(chain))

so that plone.app.workflow.remap is able to find my old workflow.

Attachments

ticket 9031.diff Download (765 bytes) - added by jnelson 6 years ago.
Patch to fix the problems with workflow transition

Change History

comment:1 Changed 6 years ago by jcbrand

  • Keywords TuneUp13 added
  • Status changed from new to assigned
  • Owner set to jcbrand

comment:2 Changed 6 years ago by hannosch

  • Component changed from Control Panel to Infrastructure

comment:3 Changed 6 years ago by jcbrand

  • Status changed from assigned to new
  • Owner jcbrand deleted

comment:4 Changed 6 years ago by jluvsu2

  • Keywords TuneUp14 added; types, workflow, controlpanel TuneUp13 removed

comment:5 Changed 6 years ago by jluvsu2

  • Keywords TuneUp15 added; TuneUp14 removed

comment:6 Changed 6 years ago by jluvsu2

  • Keywords TuneUp16 added; TuneUp15 removed

comment:7 Changed 6 years ago by jnelson

Confirmed that the included code fixes the problem - attaching a proper patch for plone.app.controlpanel

Changed 6 years ago by jnelson

Patch to fix the problems with workflow transition

comment:8 Changed 6 years ago by jnelson

  • Keywords forqa added

comment:9 Changed 6 years ago by jnelson

  • Owner set to calvinhp
  • Keywords forcommit added; forqa removed

Verified patch with lucmult - steps to reproduce:

  1. create 3 content types on a site in the Simple workflow
  2. Set one to private, one to review, and one to published
  3. Go to the plone control panel, and select "Types"
  4. Make sure to select the default workflow, and select the "intranet/extranet workflow"
  5. Choose to have private go to internally published, pending to internal draft, and published to eternally visible.
  6. after submitting, you will find that everything is set to "internal draft".

This patch fixes that problem, and allows the workflow transition to function correctly.

Verified that the patch works.

comment:10 Changed 6 years ago by jluvsu2

  • Keywords TuneUp17 added; TuneUp16 removed

comment:11 Changed 6 years ago by jluvsu2

  • Keywords TuneUp18 added; TuneUp17 removed

comment:12 Changed 6 years ago by jluvsu2

  • Keywords TuneUp20 added; TuneUp18 forcommit removed

comment:13 Changed 5 years ago by jluvsu2

  • Keywords forcommit added

comment:14 Changed 5 years ago by hoss

  • Cc hoss added

comment:15 Changed 5 years ago by jluvsu2

  • Keywords TuneUp21 added; TuneUp20 removed

comment:16 Changed 5 years ago by amleczko

  • Owner changed from calvinhp to amleczko

comment:17 Changed 5 years ago by jluvsu2

  • Keywords TuneUp22 added; TuneUp21 removed

comment:18 Changed 5 years ago by mj

  • Owner changed from amleczko to mj
  • Status changed from new to assigned

Let's see if I can help here.

comment:19 Changed 5 years ago by mj

  • Status changed from assigned to closed
  • Resolution set to fixed

(In [30829]) Fix default workflow state remapping by explicitly setting the workflow chain to the default chain before remapping. Thanks to fmoret for the patch.

Fixes #9031.

comment:20 Changed 5 years ago by mj

(In [30830]) Merge r30829 from the 1.2 branch; fix default workflow state re-mapping, refs #9031

comment:21 Changed 5 years ago by mj

(In [30831]) Merge r30829 from the 1.2 branch; fix default workflow state re-mapping, refs #9031

comment:22 Changed 5 years ago by grahamperrin

  • Cc grahamperrin@… added

comment:23 Changed 3 years ago by davisagli

  • Component changed from Infrastructure to General
Note: See TracTickets for help on using tickets.