Modify

Opened 6 years ago

Closed 6 years ago

#4150 closed enhancement (fixed)

Better diff for Estimation changes?

Reported by: lei@… Owned by: bobbysmith007
Priority: low Component: EstimatorPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.10

Description

Hi bobbysmith,

a friend of mine told me about the Estimator plugin so I am sitting down and having a look at it. He was especially adoring the diff for changes of an estimation which you can see in the ticket tail. In my system and also on https://trac.acceleration.net/TestForTimingAndEstimation/ where the Estimator plugin is installed, it just shows the old estimation, striked out. My friend told me of the known green-red diff behaviour as like as used by trac for sourcecode and wiki diffs.

I guess its implemented and I am just missing something. Do you know what?

My system is Debian, with trac 11.1. If you need screenshots, just tell me.

Thanks in advance, Lucas

Attachments (0)

Change History (4)

comment:1 Changed 6 years ago by bobbysmith007

Actually I think you are correct. I was just storing a copy of the old estimation struck through. Though it would be pretty cool to call trac's diff function there and embed a diff link. Let me look into this.

Thanks,

Russ

comment:2 Changed 6 years ago by bobbysmith007

(In [4877]) re #4150

Well after more work than anticipated, I have swapped out my uber-crappy struckthrough comment with one of the trac renderd diffs.

What it took:

  • Having a plain text version of the estimate so that when diffing we are only diffing what we care about
  • Pulling the diff_div.html template from trac and filling it with the appropriate data, then rendering that to a string
  • which gets included on a ticket when the estimate changes
  • Had to store the plain text version of the estimate in the db as well

comment:3 Changed 6 years ago by bobbysmith007

(In [4878]) re #4150 bumped version to 0.0.8

comment:4 Changed 6 years ago by bobbysmith007

  • Resolution set to fixed
  • Status changed from new to closed

Feel free to reopen if you experience any problems with this patch, but hopefully this implements a better difference than what you were getting.

Thanks for the enhancement request, this was a fun way to spend the morning.

Russ

Add Comment

Modify Ticket

Action
as closed The owner will remain bobbysmith007.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.