Ticket #772 (assigned enhancement)

Opened 3 years ago

Last modified 2 years ago

Find a flexible solution for making workflow comments mandatory or not

Reported by: madarche Assigned to: gracinet (accepted)
Priority: P3 Milestone: CPS 3.5.0
Component: CPSDefault Version: TRUNK
Severity: normal 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

2. 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

06/17/05 17:51:44 changed by didier.georgieff@agriculture.gouv.fr

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 :

3. 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 ;-)

12/14/05 21:05:21 changed by fguillaume

  • severity changed from normal to enhancement.

12/14/05 21:05:26 changed by fguillaume

  • priority changed from P2 to P3.

12/19/05 15:07:04 changed 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.

01/26/07 17:54:06 changed by gracinet

  • owner changed from trac to gracinet.
  • status changed from new to assigned.

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.

01/26/07 17:59:08 changed by gracinet

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