Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Bug #918 (new)

Opened 11 years ago

Last modified 10 years ago

Cannot delete alias for custom type to "deactivate" it

Reported by: mhaecker Owned by:
Milestone: n.a. Sprint: n.a.
Impact: Minimal Complexity: Hard
Total Remaining Time: n.a.

Description (last modified by mhaecker)

Trac comes with the standard type "enhancement" for bugs. If that type is upgraded to an agilo type, by giving it a an alias and some fields in [admin:agilo/types] that alias can not be removed again.

This leads to the new type being shown in the Action Sidebar pane as well as other places in the ui.

Workaround: Remove the offending settings in the config file.

Change History (4)

comment:1 Changed 10 years ago by fschwarz

  • Description modified (diff)
  • Summary changed from Cannot "deactivate" custom type from agilo once it's activated to Cannot delete alias for custom type to "deactivate" it

comment:2 Changed 10 years ago by fschwarz

  • Impact set to Minimal

comment:3 Changed 10 years ago by mhaecker

  • Complexity set to Hard

comment:4 Changed 10 years ago by mhaecker

  • Description modified (diff)

This is caused because the knowledge of what makes a type being active / non active is not localized at one point but instead implicit in the data returned from AgiloConfig.get_available_types(with_fields=True)

That returns a dictionary of trac_type_name: list_of_custom_fields_for_that_type and if that value is considered falsy the type is deactivated. Therefore a type should be disabled as soon as it doesn't have any custom fields active anymore (which IMO is not the intended behaviour as there are always some fields availeable for a ticket). This however seems not to be triggered because get_options_matching_re will return empty settings as setting_name: [], i.e. a setting with an empty string as the value.

This value in turn is truish and therefore activates the type.


Fixing this is difficult as we do want to make the existence of an alias the sole key that determines if a type is active in agilo (or better yet add an explicit option) and we should add an API to allow other parts of Agilo to get at this information explicitly. Which means touching at least all the places where get_available_types is used. Also recommended: splitting that method in two methods so one gives results with fields and one without.

An acceptance test for this can be found in trunk/agilo/ticket/functional_tests/

Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.15 © 2008-2016 Agilo Software all rights reserved (this page was served in: 0.162888 sec.)