Ticket #3259: ticket-timeline-comments.2.diff
| File ticket-timeline-comments.2.diff, 2.4 KB (added by athomas, 6 years ago) |
|---|
-
trac/ticket/web_ui.py
328 328 'closed': ('closedticket', 'closed'), 329 329 'edit': ('editedticket', 'updated')} 330 330 331 def produce((id, t, author, type, summary), status, fields, comment ):331 def produce((id, t, author, type, summary), status, fields, comment, cid): 332 332 if status == 'edit': 333 333 if 'ticket_details' in filters: 334 334 info = '' … … 352 352 href = format == 'rss' and req.abs_href.ticket(id) or \ 353 353 req.href.ticket(id) 354 354 355 if cid: 356 cid = cid.split('.')[-1] 357 href += '#comment:' + cid 358 355 359 if status == 'new': 356 360 message = summary 357 361 else: … … 381 385 for id,t,author,type,summary,field,oldvalue,newvalue in cursor: 382 386 if not previous_update or (id,t,author) != previous_update[:3]: 383 387 if previous_update: 384 ev = produce(previous_update, status, fields, comment )388 ev = produce(previous_update, status, fields, comment, cid) 385 389 if ev: 386 390 yield ev 387 391 status, fields, comment = 'edit', {}, '' 388 392 previous_update = (id,t,author, type, summary) 389 393 if field == 'comment': 394 cid = oldvalue 390 395 comment = newvalue 391 396 elif field == 'status' and newvalue in ('reopened', 'closed'): 392 397 status = newvalue 393 398 else: 394 399 fields[field] = newvalue 395 400 if previous_update: 396 ev = produce(previous_update, status, fields, comment )401 ev = produce(previous_update, status, fields, comment, cid) 397 402 if ev: 398 403 yield ev 399 404 … … 403 408 " FROM ticket WHERE time>=%s AND time<=%s", 404 409 (start, stop)) 405 410 for row in cursor: 406 yield produce(row, 'new', {}, None )411 yield produce(row, 'new', {}, None, None) 407 412 408 413 # Internal methods 409 414
