Edgewall Software

Ticket #3281: optional-keywords.patch

File optional-keywords.patch, 0.8 kB (added by wkornew, 2 years ago)

cleaned up. includes documentation for show_keywords. patch against trunk

  • trac/ticket/api.py

     
    6868        [wiki:TracTickets#AssigntoasDropDownList AssignToAsDropDownList] 
    6969        (''since 0.9'').""") 
    7070 
     71    show_keywords = BoolOption('ticket', 'show_keywords', 'true', 
     72        """Show the keywords field for tickets. 
     73        (''since 0.10'').""") 
     74 
    7175    # Public API 
    7276 
    7377    def get_available_actions(self, ticket, perm_): 
     
    136140 
    137141        # Advanced text fields 
    138142        for name in ('keywords', 'cc', ): 
     143            if name == 'keywords' and not self.show_keywords: 
     144                continue 
    139145            field = {'name': name, 'type': 'text', 'label': name.title()} 
    140146            fields.append(field) 
    141147