Edgewall Software

Ticket #10462: #10462_.patch

File #10462_.patch, 1.8 KB (added by tkempitiya@…, 10 years ago)

added new Option default_group_by and check its availability and set that as default group by

  • trac/ticket/roadmap.py

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    617617        doc="""Default milestone to which tickets are retargeted when
    618618            closing or deleting a milestone. (''since 1.1.2'')""")
    619619
     620
     621
     622
    620623    # INavigationContributor methods
    621624
    622625    def get_active_navigation_item(self, req):
     
    922925    def _render_view(self, req, milestone):
    923926        milestone_groups = []
    924927        available_groups = []
    925         component_group_available = False
     928        _available = False
    926929        ticket_fields = TicketSystem(self.env).get_ticket_fields()
    927930
    928931        # collect fields that can be used for grouping
     
    931934                    or field['name'] in ('owner', 'reporter'):
    932935                available_groups.append({'name': field['name'],
    933936                                         'label': field['label']})
    934                 if field['name'] == 'component':
    935                     component_group_available = True
     937                if field['name'] == :
     938                    _available = True
    936939
    937940        # determine the field currently used for grouping
    938941        by = None
    939         if component_group_available:
    940             by = 'component'
     942        if _available:
     943            by =
    941944        elif available_groups:
    942945            by = available_groups[0]['name']
    943946        by = req.args.get('by', by)