Ticket #772 (assigned enhancement)

Opened 14 years ago

Last modified 10 years ago

Find a flexible solution for making workflow comments mandatory or not

Reported by: madarche Owned by: gracinet
Priority: P1 Milestone: CPS 3.5.7
Component: CPSDefault Version: TRUNK
Severity: minor Keywords: mandatory optional workflow comments usability ui
Cc:

Description

Find a flexible solution for making workflow comments mandatory or not.

Currently comments in some workflow actions forms (submit, accept, etc) are mandatory and not mandatory in some other actions forms (modify).

For some clients and projects those actual default choices are not appreciated. For some clients and projects all comments should be mandatory, while for some others no comments should be mandatory and for some others at last only the comments on the modify actions make sense.

This situation cries for a way to customize which comments should be mandatory.

Now how and where to store those preferences?

Some solutions:

  1. Add a property on the workflow tool to specify which action comments should be mandatory
  1. Specify in the workflow action description if comments are mandatory

In all cases, the CPSDefault UI should be extended so that it can understand those preferences/settings so it knows when to enforce mandatory comments.

Any other idea? Would this meet your needs?

Change History

comment:1 Changed 14 years ago by didier.georgieff@…

If I understand well your call, I would vote for a 'place' where it is possible to give such information for all WF. Something like "global WF policy" for all WF of this kind.

I also could see some use case where i can surcharge the global policy for a particular WF.

It also could be very helpfull to be able to give other parameters some default values and not only mandatory comments. Like default values for sending mails, or things like that. I can be more precise but in french if you need ;-)

So i guess this would be a thrid option :

  1. Add a place to give WF policy.

I also can see some benefits for having such behaviour for creating objects (ie define a global policy when creating an object). If this make sense anyway. Not sure ;-)

comment:2 Changed 14 years ago by fguillaume

  • Severity changed from normal to enhancement

comment:3 Changed 14 years ago by fguillaume

  • Priority changed from P2 to P3

comment:4 Changed 14 years ago by madarche

  • Milestone changed from CPS 3.4.0 to CPS 3.5.0

This enhancement will first be implemented with a low-tech approach using an overridable skin script somewhere like "getActionCommentability.py" to which will be passed the action (workflow transition or "modify") and other relevant info, and which returns False, True or 'required'.

Later on we could use layouts for each transition forms which is cleaner.

comment:5 Changed 13 years ago by gracinet

  • Status changed from new to assigned
  • Owner changed from trac to gracinet

This one was getting long.

There is a new property on workflow transitions to control this [50898], [50900] In the profile, use the <comment-behaviour> tag. This is a TALES expression that should output 'display' for the comment textarea to be displayed (also what gets returned by default if the expression is empty) Expression context vars: portal, proxy, modules, nothing, transition (the object), context.

no ZMI UI yet. API call on the workflow tool: wftool.getCommentBehaviour(proxy, context).

Leveraged in CPSDocument [50901]. Next guy that needs the 'required' behaviour will implement it.

comment:6 Changed 13 years ago by gracinet

Small mistake above. The correct call is: wftool.getCommentBehaviour(transition_id, proxy, context)

comment:7 Changed 10 years ago by gracinet

  • Priority changed from P3 to P1
  • Severity changed from normal to minor

another almost finished feature that's not usable because it's not exposed properly in UI (ZMI in that case)

Note: See TracTickets for help on using tickets.