[views/ticket actions] limit "move to version" action to individual tickets (closes #2772256)

Since CubicWeb 3.16, these actions appear prominently as tabs in the version table. There lack however a clear labelling of the consequence/purpose of the actions because of limits in the table actions submenus handling (or lack thereof).

Hence we limit this action to individual ticket.

authorAurelien Campeas <aurelien.campeas@logilab.fr>
changeset2514a8839d91
branchdefault
phasedraft
hiddenyes
parent revision#57369ae88125 [ms] remove now unused option pyro-ns-id (closes #2582788)
child revision<not specified>
files modified by this revision
views/ticket.py
# HG changeset patch
# User Aurelien Campeas <aurelien.campeas@logilab.fr>
# Date 1363957215 -3600
# Fri Mar 22 14:00:15 2013 +0100
# Node ID 2514a8839d91254229e16ee90b6ec1ab43cd7d52
# Parent 57369ae88125d09db89a85a2a1dee5778bf825ec
[views/ticket actions] limit "move to version" action to individual tickets (closes #2772256)

Since CubicWeb 3.16, these actions appear prominently as tabs in the version
table. There lack however a clear labelling of the consequence/purpose of the actions
because of limits in the table actions submenus handling (or lack thereof).

Hence we limit this action to individual ticket.

diff --git a/views/ticket.py b/views/ticket.py
@@ -209,10 +209,11 @@
1 
2 
3  class TicketMoveToNextVersionActions(TicketAction):
4      __regid__ = 'movetonext'
5      __select__ = (TicketAction.__select__
6 +                  & one_line_rset() &
7                    & score_entity(lambda x: x.cw_adapt_to('IWorkflowable').state in x.OPEN_STATES)
8                    & ticket_has_next_version())
9 
10      submenu = _('move to version')
11