Opened 7 years ago

Closed 3 years ago

# [Patch] Configuration for tickets "not" of given types

Reported by: Owned by: Adam Bellaire Vladimir Abramov low TypedTicketWorkflowPlugin normal 0.11

### Description

This plugin works great, but the fact that your configuration is opt-in can make certain configurations a hassle. Luckily, it was pretty trivial to patch the code to allow for an additional configuration for nottickettype, which is the opposite of tickettype configuration option.

For example, if you have "someaction" that isn't applicable to tasks, you can say:

someaction.nottickettype = task


Since this is an additional configuration option on top of the existing setup, enabling the patched version of the plugin for existing configurations won't break anything, and having "nottickettype" in your configuration if you don't have the patch will simply be ignored.

Here's the patch against r7501:

• ## controller.py

 filterd_actions.append((default, action_name)) else: filterd_actions.append((default, action_name)) return filterd_actions No newline at end of file if 'nottickettype' in action_attributes: # note that if both tickettype and nottickettype are specified for the same # type, nottickettype will have precendence and the action will be unavailable forbidden_types = [a.strip() for a in action_attributes['nottickettype'].split(',')] if (ticket.get_value_or_default('type') in forbidden_types and (default, action_name) in filterd_actions): filterd_actions.remove((default, action_name)) return filterd_actions

### comment:1 Changed 7 years ago by Ryan J Ollos

Summary: Configuration for tickets "not" of given types → [Patch] Configuration for tickets "not" of given types defect → enhancement

### comment:2 Changed 3 years ago by Ryan J Ollos

Resolution: → wontfix new → closed

Most users will have a fairly small number of ticket types, and I think that another configuration option will just confuse things for the most part.

### Modify Ticket

Change Properties