- Timestamp:
- 06/19/08 12:26:50 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/dashboardreportsplugin/dashboardreports/patch/ticket-query.diff
r264 r302 1 1 Index: trac/ticket/api.py 2 2 =================================================================== 3 --- trac/ticket/api.py (revision 7 142)3 --- trac/ticket/api.py (revision 7218) 4 4 +++ trac/ticket/api.py (working copy) 5 5 @@ -182,6 +182,17 @@ … … 23 23 Index: trac/ticket/query.py 24 24 =================================================================== 25 --- trac/ticket/query.py (revision 7 142)25 --- trac/ticket/query.py (revision 7218) 26 26 +++ trac/ticket/query.py (working copy) 27 27 @@ -43,6 +43,8 @@ … … 51 51 kw_strs = ['order', 'group', 'page', 'max'] 52 52 kw_arys = ['rows'] 53 @@ -132,1 1 +135,11@@53 @@ -132,18 +135,18 @@ 54 54 for filter_ in filters: 55 55 filter_ = filter_.split('=') … … 65 65 # from last char of `field`, get the mode of comparison 66 66 mode, neg = '', '' 67 if field[-1] in ('~', '^', '$'):68 @@ -142,8 +145,8 @@69 67 if field[-1] in ('~', '^', '$'): 70 68 mode = field[-1] … … 106 104 db = self.env.get_db_cnx() 107 105 cursor = db.cursor() 108 @@ -279,1 0 +280,10@@106 @@ -279,18 +280,15 @@ 109 107 fields += [f for f in self.fields if f['name'] == column] or [None] 110 108 results = [] … … 120 118 if name == self.group: 121 119 val = val or 'None' 122 @@ -288,9 +289,6 @@123 val = val or 'None'124 120 elif name == 'reporter': 125 121 val = val or 'anonymous' … … 141 137 enum_columns = ('resolution', 'priority', 'severity') 142 138 # Build the list of actual columns to query 143 @@ -418, 6 +418,19@@139 @@ -418,15 +418,27 @@ 144 140 % (col, col, col)) 145 141 … … 161 157 name = 't.' + name 162 158 else: 163 @@ -422,11 +435,10 @@164 name = 't.' + name165 else:166 159 name = name + '.value' 167 160 - value = value[len(mode) + neg:] … … 184 177 value) 185 178 186 @@ -446,1 2 +458,15@@179 @@ -446,18 +458,22 @@ 187 180 for k, v in self.constraints.items(): 188 181 if req: … … 204 197 205 198 # Special case id ranges 206 if k == 'id':207 @@ -457,7 +472,8 @@208 199 if k == 'id': 209 200 ranges = Ranges() … … 224 215 # Special case for exact matches on multiple values 225 216 elif not mode and len(v) > 1: 226 @@ -480, 9 +496,9@@217 @@ -480,16 +496,16 @@ 227 218 else: 228 219 col = k + '.value' … … 236 227 constraint_sql = filter(None, 237 228 [get_constraint_sql(k, val, mode, neg) 238 @@ -489,7 +505,7 @@239 229 for val in v]) 240 230 if not constraint_sql: … … 245 235 [item[0] for item in constraint_sql]) + ")") 246 236 else: 247 @@ -567, 6 +583,7 @@237 @@ -567,27 +583,27 @@ 248 238 249 239 def template_data(self, context, tickets, orig_list=None, orig_time=None, … … 251 241 + global is_op 252 242 constraints = {} 253 for k, v in self.constraints.items():254 constraint = {'values': [], 'mode': ''}255 @@ -571,13 +588,16 @@256 243 for k, v in self.constraints.items(): 257 244 constraint = {'values': [], 'mode': ''} … … 274 261 constraints[k] = constraint 275 262 276 @@ -584,10 +604,6 @@277 263 cols = self.get_columns() 278 264 labels = dict([(f['name'], f['label']) for f in self.fields]) … … 305 291 306 292 # For clients without JavaScript, we remove constraints here if 307 @@ -10 37,9 +1055,6 @@293 @@ -1043,9 +1061,6 @@ 308 294 kwargs['format'] = argv[0] 309 295
Note: See TracChangeset
for help on using the changeset viewer.
