Ticket #4548 (assigned defect)

Opened 4 years ago

Last modified 3 years ago

[Patch] TypedTicketWorkflow should also override get_actions_by_operation_for_req

Reported by: geoff Assigned to: kivsiak (accepted)
Priority: normal Component: TypedTicketWorkflowPlugin
Severity: normal Keywords:
Cc: rjollos Trac Release: 0.11

Description

Other workflow plugins use ConfigurableTicketWorkflow?.get_actions_by_operation_for_req to determine if their plugin's action can be used. Since TypedTicketWorkflow? doesn't override this method it cannot be used to remove these actions from display. This patch implements this method.

Attachments

typedticketworkflowplugin-4548.patch (0.7 kB) - added by geoff on 01/29/09 19:09:11.
patch against r5169

Change History

01/29/09 19:09:11 changed by geoff

  • attachment typedticketworkflowplugin-4548.patch added.

patch against r5169

01/29/09 19:11:13 changed by geoff

Somehow nothing is showing on the patch preview, so I'm pasting it here:

Index: 0.11/typedworkflow/controller.py
===================================================================
--- 0.11/typedworkflow/controller.py	(revision 5169)
+++ 0.11/typedworkflow/controller.py	(working copy)
@@ -25,4 +25,9 @@
                     filterd_actions.append((default, action_name))
             else:
                 filterd_actions.append((default, action_name))                
-        return filterd_actions
\ No newline at end of file
+        return filterd_actions
+
+    def get_actions_by_operation_for_req(self, req, ticket, operation):
+        actions = ConfigurableTicketWorkflow.get_actions_by_operation_for_req(self, req, ticket, operation)
+        actions = self.filter_actions(actions, ticket)
+        return actions

(follow-up: ↓ 6 ) 02/13/09 22:25:57 changed by kivsiak

  • status changed from new to assigned.

Thanks for your patch. I'll apply it to next version

09/16/09 08:29:24 changed by rjollos

  • cc set to rjollos.

(follow-up: ↓ 5 ) 11/04/09 05:03:09 changed by anonymous

Does this work? Been trying this and the "fix" on 4547 and cant get it to work properly...

(in reply to: ↑ 4 ) 11/04/09 05:10:06 changed by anonymous

Replying to anonymous:

Does this work? Been trying this and the "fix" on 4547 and cant get it to work properly...

Ignore this comment.... I'm an idiot.... big difference between ticketype and ticketType

(in reply to: ↑ 2 ) 11/08/09 12:05:30 changed by anonymous

Replying to kivsiak:

Thanks for your patch. I'll apply it to next version

For when is the next version planned?

02/10/10 15:38:49 changed by rjollos

  • summary changed from TypedTicketWorkflow should also override get_actions_by_operation_for_req to [Patch] TypedTicketWorkflow should also override get_actions_by_operation_for_req.

Add/Change #4548 ([Patch] TypedTicketWorkflow should also override get_actions_by_operation_for_req)




Change Properties
Action