Ticket #4641 (new Feature Request)

Opened 3 years ago

Last modified 5 months ago

State transition menu depends on name of workflow state variable

Reported by: Anonymous User Assigned to:
Priority: minor Milestone: Future
Component: Navigation/Folder listings Keywords: sprint
Cc:

Description (Last modified by hannosch)

With a custom workflow, the state transition menu is not displayed.

In global_defines.pt, Plone declares it needs review_state variable for getting the workflow state information for the object (this variable is used by Plone default workflows). If the state variable's name is something else, a condition check in global_contentmenu.pt fails and state menu is not displayed.

Possible solution could be add new method workflowTool.getState() and use it instead of workflowTool.getInfoFor(). This method would first query state variable name from workflow.variables.getStateVar() and then return the value of this variable.

global_defines.pt:

global wf_state python:wtool.getInfoFor(here,'review_state',None);

global_contentmenu.pt:

<tal:states define="review_state wf_state;

transitions workflow_actions;"

condition="python:review_state">

Change History

03/10/06 02:36:00 changed by hannosch

  • description changed.
  • milestone changed from 2.5 to 3.0.

10/14/06 04:46:34 changed by hannosch

  • owner changed from to optilude.
  • priority changed from minor to major.
  • component changed from Workflow to Navigation/Folder listings.

Something for Mr. Global Conentmenu ;)

03/28/07 10:53:18 changed by optilude

  • owner changed from optilude to nobody.
  • priority changed from major to minor.
  • type changed from defect to enhancement.
  • milestone changed from 3.0 to 3.0.x.

I'm pretty sure 'review_state' is hardcoded in lots of other places, but if the fix is as simple as described, then it probably makes sense; it'd need to go in plone.app.contentmenu. It's more of an enhancement than a bug, though, since the default assumption is that the variable is called 'review_state'.

03/28/07 10:53:36 changed by optilude

  • keywords set to sprint.

It's a nicely chunked sprint task too :-)

03/28/07 11:11:22 changed by optilude

  • summary changed from State transition menu is not displayed to State transition menu depends on name of workflow state variable.

06/30/07 19:44:14 changed by hannosch

  • milestone changed from 3.0.x to 3.5.

This is a feature, too late for 3.0.x.

07/13/08 17:25:57 changed by hannosch

  • owner deleted.
  • type changed from enhancement to Enhancement.
  • milestone changed from 4.0 to Future.