Edgewall Software
Modify

Opened 13 years ago

Closed 12 years ago

#6664 closed defect (fixed)

Trac ticket change history doesn't show the difference for the latest changes

Reported by: ywgu@… Owned by: Christian Boos
Priority: high Milestone: 0.11
Component: ticket system Version: 0.11b1
Severity: minor Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Christian Boos)

After I made some changes to a ticket, the diff link in the latest change doesn't link to the right page. It compares the initial and the second version in the change history.

The link should have a version parameter in the URL which is missing. So instead of

http://<ip>/imobile/ticket/50?action=diff

it should be:

http://<ip>/imobile/ticket/50?action=diff&version=<version num>

Attachments (2)

fix_ticket_description_diff_links-r6391.diff (5.9 KB ) - added by Christian Boos 13 years ago.
Fix the reported bug and do some related clean-ups
strange-diff-titles.png (56.8 KB ) - added by jenn@… 13 years ago.
A few examples of what my diffs look like after the patch

Download all attachments as: .zip

Change History (17)

comment:1 by Christian Boos, 13 years ago

Milestone: 0.11.10.11

Right, I've seen this myself but didn't have time so far to fix this.

by Christian Boos, 13 years ago

Fix the reported bug and do some related clean-ups

comment:2 by Christian Boos, 13 years ago

Owner: changed from Jonas Borgström to Christian Boos
Severity: normalminor
Status: newassigned

Patch attached, please test.

comment:3 by Christian Boos, 13 years ago

Description: modified (diff)

(adding a test case right here ;-) )

comment:4 by osimons, 13 years ago

Nice formatting with the '(diff)' in the ticket comment. I like.

However, cliking that (or the diff) in description leaves me a bit bewildered as it as header says: Changes between Initial Version and Version 14 of Ticket #84 with correct url (?action=diff&version=14). I see it is because the description has not been updated since it was created, but a number of comments has happened inbetween this change. But, because of that it will also render any other property that has changed between version 1 and 14 - a bit confusing actually. I would have though it would diff only 13→14, where no other properties was updated.

Next strange behaviour is that if I modify the url, and set version to anything from 1 to 14 it will display the same diff, and the same set of property changes - and regardless of version number it will keep referring to it as 'changes between initial version and version 14'.

What is actually supposed to be shown and why?

Also tested for email notification. That works fine (unaffected).

comment:5 by Christian Boos, 13 years ago

What you're seeing is the "expected" behavior, as the diff view will focus only on the text view changes, not on the field changes (there's the inline change history for that anyway).

So if you have:

  1. Initial ticket content
  2. some property changes
  3. some property changes
  4. some text changes
  5. some property changes
  6. some property changes
  7. some text changes

If you take the last (diff) link and then follow the "Previous change" link, you will see the diff from 4 to 7, then the diff from initial to 4.

With the other strategy, if the (diff) link shows the changes from 6 to 7, then what should the "Previous change" link show? The uninteresting property diff from 5 to 6, or the text change from 3 to 4? In the first case, you would usually have to go through a lot of clicks in "real" tickets, in order to get to the next text change. In the second case, you will miss the intermediate property changes.

in reply to:  5 comment:6 by osimons, 13 years ago

Replying to cboos:

What you're seeing is the "expected" behavior, as the diff view will focus only on the text view changes, not on the field changes (there's the inline change history for that anyway).

Thanks, I just needed confirmation on intended behaviour to be able to have an opinion on the implementation when testing. Works fine then, so +1 from me at least.

comment:7 by ywgu@…, 13 years ago

Resolution: fixed
Status: assignedclosed

It works great! Thanks.

comment:8 by Emmanuel Blot, 13 years ago

Resolution: fixed
Status: closedreopened

(yet to be committed to the repository)

comment:9 by jenn@…, 13 years ago

I'm now getting the proper diff, but the header links on each pane of the diff are strange. The text of each link is "Version <name>", where <name> is the username of the ticket owner. Other than that, though, it's a major improvement. Thanks!

comment:10 by jenn@…, 13 years ago

Actually, the titles seem to depend on the circumstance; sometimes it's the owner, sometimes the severity, sometimes the ticket summary…see screenshot.

by jenn@…, 13 years ago

Attachment: strange-diff-titles.png added

A few examples of what my diffs look like after the patch

in reply to:  9 comment:11 by Christian Boos, 13 years ago

Well, this works fine for me.

Which Genshi version are you using? If not already using its latest trunk, could you please upgrade (to e.g. [G789])?

comment:12 by osimons, 13 years ago

#3914 requests the diff to be available in the notification email as well.

comment:13 by Christian Boos, 13 years ago

btw, osimons, are you able to reproduce the "strange-diff-titles" effect? If not, I'll apply the patch and close the ticket.

in reply to:  13 ; comment:14 by osimons, 13 years ago

Replying to cboos:

btw, osimons, are you able to reproduce the "strange-diff-titles" effect? If not, I'll apply the patch and close the ticket.

Sort of yes, a diff between version 1 and 3 shows as:

Index: Ticket #19 – description
===================================================================
---  Version number1
+++  Version number1

Changing again (3→4) shows the same diff header (Version number 1 for both).

in reply to:  14 comment:15 by Christian Boos, 12 years ago

Resolution: fixed
Status: reopenedclosed

Replying to osimons:

Sort of yes, a diff between version 1 and 3 shows as: —- Version number1 +++ Version number1

Sorry, didn't realize the bug was affecting the side-by-side view exclusively. This glitch is fixed now.

Committed corrected patch as [6503].

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.