Ignore:
Timestamp:
06/19/08 12:26:50 (5 years ago)
Author:
aculapov
Message:
  • patch after 7218 revision
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugins/dashboardreportsplugin/dashboardreports/patch/ticket-query.diff

    r264 r302  
    11Index: trac/ticket/api.py 
    22=================================================================== 
    3 --- trac/ticket/api.py  (revision 7142) 
     3--- trac/ticket/api.py  (revision 7218) 
    44+++ trac/ticket/api.py  (working copy) 
    55@@ -182,6 +182,17 @@ 
     
    2323Index: trac/ticket/query.py 
    2424=================================================================== 
    25 --- trac/ticket/query.py        (revision 7142) 
     25--- trac/ticket/query.py        (revision 7218) 
    2626+++ trac/ticket/query.py        (working copy) 
    2727@@ -43,6 +43,8 @@ 
     
    5151         kw_strs = ['order', 'group', 'page', 'max'] 
    5252         kw_arys = ['rows'] 
    53 @@ -132,11 +135,11 @@ 
     53@@ -132,18 +135,18 @@ 
    5454         for filter_ in filters: 
    5555             filter_ = filter_.split('=') 
     
    6565             # from last char of `field`, get the mode of comparison 
    6666             mode, neg = '', '' 
    67              if field[-1] in ('~', '^', '$'): 
    68 @@ -142,8 +145,8 @@ 
    6967             if field[-1] in ('~', '^', '$'): 
    7068                 mode = field[-1] 
     
    106104             db = self.env.get_db_cnx() 
    107105         cursor = db.cursor() 
    108 @@ -279,10 +280,10 @@ 
     106@@ -279,18 +280,15 @@ 
    109107             fields += [f for f in self.fields if f['name'] == column] or [None] 
    110108         results = [] 
     
    120118                 if name == self.group: 
    121119                     val = val or 'None' 
    122 @@ -288,9 +289,6 @@ 
    123                      val = val or 'None' 
    124120                 elif name == 'reporter': 
    125121                     val = val or 'anonymous' 
     
    141137         enum_columns = ('resolution', 'priority', 'severity') 
    142138         # Build the list of actual columns to query 
    143 @@ -418,6 +418,19 @@ 
     139@@ -418,15 +418,27 @@ 
    144140                        % (col, col, col)) 
    145141  
     
    161157                 name = 't.' + name 
    162158             else: 
    163 @@ -422,11 +435,10 @@ 
    164                  name = 't.' + name 
    165              else: 
    166159                 name = name + '.value' 
    167160-            value = value[len(mode) + neg:] 
     
    184177                     value) 
    185178  
    186 @@ -446,12 +458,15 @@ 
     179@@ -446,18 +458,22 @@ 
    187180         for k, v in self.constraints.items(): 
    188181             if req: 
     
    204197  
    205198             # Special case id ranges 
    206              if k == 'id': 
    207 @@ -457,7 +472,8 @@ 
    208199             if k == 'id': 
    209200                 ranges = Ranges() 
     
    224215             # Special case for exact matches on multiple values 
    225216             elif not mode and len(v) > 1: 
    226 @@ -480,9 +496,9 @@ 
     217@@ -480,16 +496,16 @@ 
    227218                 else: 
    228219                     col = k + '.value' 
     
    236227                 constraint_sql = filter(None, 
    237228                                         [get_constraint_sql(k, val, mode, neg) 
    238 @@ -489,7 +505,7 @@ 
    239229                                          for val in v]) 
    240230                 if not constraint_sql: 
     
    245235                         [item[0] for item in constraint_sql]) + ")") 
    246236                 else: 
    247 @@ -567,6 +583,7 @@ 
     237@@ -567,27 +583,27 @@ 
    248238  
    249239     def template_data(self, context, tickets, orig_list=None, orig_time=None, 
     
    251241+        global is_op 
    252242         constraints = {} 
    253          for k, v in self.constraints.items(): 
    254              constraint = {'values': [], 'mode': ''} 
    255 @@ -571,13 +588,16 @@ 
    256243         for k, v in self.constraints.items(): 
    257244             constraint = {'values': [], 'mode': ''} 
     
    274261             constraints[k] = constraint 
    275262  
    276 @@ -584,10 +604,6 @@ 
    277263         cols = self.get_columns() 
    278264         labels = dict([(f['name'], f['label']) for f in self.fields]) 
     
    305291  
    306292         # For clients without JavaScript, we remove constraints here if 
    307 @@ -1037,9 +1055,6 @@ 
     293@@ -1043,9 +1061,6 @@ 
    308294             kwargs['format'] = argv[0] 
    309295  
Note: See TracChangeset for help on using the changeset viewer.