Edgewall Software

Ticket #4322 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

Ticket History Issues

Reported by: Tim Hatch <trac@…> Owned by: cboos
Priority: high Milestone: 0.11
Component: ticket system Version: devel
Severity: normal Keywords: history diff
Cc:

Description

Apologies in advance for this megaticket. I thought it might be good to have them all in one place since they're all related to the solution for #2945. Issues exist as of r4391.

  • timeline/ticket_history.html:
    • $item.ipnr is always empty for me.
  • timeline/ticket_view.html:
    • attachments don't show up when explicitly viewing current version (by design? what if I want an old attachment, are they still around?)
    • viewing explicit version always uses newest's description
  • timeline/ticket_diff.html:
    • Doesn't include diff.js so the unified-vs-tabular links aren't there

Attachments

Change History

in reply to: ↑ description ; follow-up: ↓ 5   Changed 2 years ago by cboos

  • keywords history diff added
  • owner changed from jonas to cboos
  • priority changed from normal to high
  • milestone set to 0.11

Replying to Tim Hatch <trac@timhatch.com>:

Apologies in advance for this megaticket.

No problem, this kind of check pointing is well appreciated.

I thought it might be good to have them all in one place since they're all related to the solution for #2945. Issues exist as of r4391.

Well, not really, some have always been there. Let's go through.

* timeline/ticket_history.html: * $item.ipnr is always empty for me.

ipnr was never recorded for the ticket subsystem, see #1890 and the TracDev/Proposals/Journaling.

* timeline/ticket_view.html: * attachments don't show up when explicitly viewing current version (by design? what if I want an old attachment, are they still around?)

Attachment history is currently parallel to normal ticket history, and also a bit "volatile": when an attachment is deleted or replaced the old attachment is deleted/replaced and the original attachment event simply disappears. Whether this is a good thing or not can be discussed, of course, as well as what would be a better approach, but this behavior was there since the beginning.

A short term "fix" would be to nevertheless display the attachments when we can do so, in viewing a specific ticket version (currently those events are simply skipped, because I felt they're not really part of the history because of the limitations described above).

* viewing explicit version always uses newest's description

That's defective, yes.

* timeline/ticket_diff.html: * Doesn't include diff.js so the unified-vs-tabular links aren't there

Ok, that's another defect.

  Changed 2 years ago by cboos

Main issue fixed in r4401.

From #4326, I gather that you're working on the diff.js issue, so I'll leave the issue open.

  Changed 2 years ago by Tim Hatch <trac@…>

Here's the fix:

  • trac/ticket/web_ui.py

     
    3535from trac.util.text import CRLF, shorten_line 
    3636from trac.versioncontrol.diff import get_diff_options, diff_blocks 
    3737from trac.web import IRequestHandler 
    38 from trac.web.chrome import add_link, add_stylesheet, INavigationContributor, \ 
    39                             Chrome 
     38from trac.web.chrome import add_link, add_script, add_stylesheet, \ 
     39                            INavigationContributor, Chrome 
    4040 
    4141 
    4242class InvalidTicket(TracError): 
     
    411411                     'Version %d' % next_version) 
    412412 
    413413        add_stylesheet(req, 'common/css/diff.css') 
     414        add_script(req, 'common/js/diff.js') 
    414415 
    415416        data.update({ 
    416417            'title': 'Ticket Diff', 

  Changed 2 years ago by cboos

  • status changed from new to closed
  • resolution set to fixed

Ok, applied in r4403.

OTOH, I wonder if the unified diff view is really useful in these situations... So I did it for the sake of consistency, but I wouldn't have a problem if that was later reverted ;)

in reply to: ↑ 1   Changed 2 years ago by cmlenz

Replying to cboos:

Replying to Tim Hatch <trac@timhatch.com>:

* timeline/ticket_history.html: * $item.ipnr is always empty for me.

ipnr was never recorded for the ticket subsystem, see #1890 and the TracDev/Proposals/Journaling.

So then, why is the template trying to display the IP address? That should be removed until it's actually backed by functionality, in the meantime all it does is cause confusion.

  Changed 2 years ago by cboos

Well, I removed it from the display in r4406, but I kept it in the template, as I'd like to ultimately converge to some generic _history or _diff templates.

There are currently only a few differences:

It would be better to have a common template and then be able to "inject" some additional elements to differentiate them where needed (e.g. add the delete version form in wiki diff).

Add/Change #4322 (Ticket History Issues)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
to The owner will change from cboos. Next status will be 'closed'
 
Note: See TracTickets for help on using tickets.