On Friday, February 12, 2016 at 9:58:05 AM UTC-8, Ryan Shaw wrote:
>
> Hi,
>
> I'm using the StatusFixer workflow modification plugin that is found here:
>
>
> http://trac.edgewall.org/browser/trunk/sample-plugins/workflow/StatusFixer.py
>
> I'd like to modify the plugin so that if the 'status' is 'closed', then 
> the radio button option will not show up on a ticket, i.e., one would have 
> to reopen the ticket in order to access the StatusFixer functionality. Any 
> ideas on how to do that?
>
> Thanks,
> Ryan
>

Just modify the plugin with the following patch:

Index: sample-plugins/workflow/StatusFixer.py

===================================================================

--- sample-plugins/workflow/StatusFixer.py (revision 14533)

+++ sample-plugins/workflow/StatusFixer.py (working copy)

@@ -47,7 +47,8 @@

 

     def get_ticket_actions(self, req, ticket):

         actions = []

-        if 'TICKET_STATUSFIX' in req.perm(ticket.resource):

+        if ticket['status'] != 'closed' and \

+                'TICKET_STATUSFIX' in req.perm(ticket.resource):

             actions.append((0, 'force_status'))

         return actions
  

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to