Edgewall Software
Modify

Opened 7 years ago

Closed 6 years ago

Last modified 6 years ago

#10962 closed enhancement (fixed)

Show due date of milestone in ticket

Reported by: franz.mayer@… Owned by: Ryan J Ollos
Priority: normal Milestone: 1.0.2
Component: ticket system Version: 1.0
Severity: normal Keywords: milestone date
Cc: Jun Omae Branch:
Release Notes:

Milestone resource links are rendered with the due or completed information in the tooltip.

API Changes:

Description (last modified by Christian Boos)

In ticket view is a link to the assigned milestone. When you want to know what due date has that milestone, you have to click on the milestone link.

It would be nice to have that information already in the ticket view. There might be two ways to achieve this:

  1. by tooltip
  2. by adding it after milestone name

Attachments (0)

Change History (12)

comment:1 by Christian Boos, 7 years ago

Description: modified (diff)
Milestone: next-stable-1.0.x

I think option a) looks better, and it should probably be due date only for opened milestones, and completed date should be shown instead for closed milestones.

That should be added to MilestoneModule._render_link (PatchWelcome).

comment:2 by Ryan J Ollos, 6 years ago

Milestone: next-stable-1.0.x1.0.2
Owner: set to Ryan J Ollos
Status: newassigned

comment:3 by Ryan J Ollos, 6 years ago

Should we show No due date when the due date hasn't been set, rather than showing nothing in the tooltip?

Proposed changes can be found in log:rjollos.git:t10962. I added the if hasattr(context, 'req') to support the possibility of a context being passed that is not a web_context, since it wouldn't have a req bound to it. Let me know if this doesn't look right.

The wikisyntax unit tests run with the en_US locale, but the output of format_datetime is 11/24/13 07:41:24 without Babel and Nov 24, 2013 7:41:24 AM with Babel. [b6b2568f/rjollos.git] is implemented so that the test passes with and without Babel, and further adjustments made in [8063c5b0/rjollos.git]. Maybe there is a better way.

comment:4 by Jun Omae, 6 years ago

Cc: Jun Omae added

I think we should show the tooltips in the same format or some other similar format with localization in milestone view.

Is Completed Completed %(duration)s ago (%(date)s)
Is late %(duration)s late (%(date)s)
Due Due in %(duration)s (%(date)s)
No due date No date set

comment:5 by Ryan J Ollos, 6 years ago

Release Notes: modified (diff)

Changes suggested in comment:4 have been added in [e1fae589/rjollos.git]. Everything else look okay?

comment:6 by Jun Omae, 6 years ago

Okay, looks good! But I have one suggestion. Using the existing translation messages would be less work of translators, in [2e48536a/jomae.git]. Even so, it would add new one.

in reply to:  6 comment:7 by Ryan J Ollos, 6 years ago

Resolution: fixed
Status: assignedclosed

Replying to jomae:

Even so, it would add new one.

I see that is due to the strong tags around the %(duration)s late. Thanks for the hints. I will diff the pot file in the future to detect changes like this.

Committed to 1.0-stable in [12267:12268]. Merged to trunk in [12269].

comment:8 by Jun Omae, 6 years ago

I found 1 failure due to differences of CLDR between Babel 0.9.x and 1.x.

========== diff: ==========
--- expected
+++ actual
@@ -1,8 +1,8 @@
 <p>
 <a class="missing milestone" href="/milestone/foo" rel="nofollow">milestone:foo</a>
 <a class="milestone" href="/milestone/boo" title="No date set">Milestone Boo</a>
-<a class="closed milestone" href="/milestone/roo" title="Completed 4 weeks ago (Nov 1, 2013 11:59:58 AM)">Milestone Roo</a>
-<a class="milestone" href="/milestone/woo" title="Due in 17 years (Nov 1, 2030 11:59:58 AM)">Milestone Woo</a>
-<a class="milestone" href="/milestone/zoo" title="4 weeks late (Nov 1, 2013 11:59:58 AM)">Milestone Zoo</a>
+<a class="closed milestone" href="/milestone/roo" title="Completed 4 weeks ago (Nov 1, 2013, 11:59:58 AM)">Milestone Roo</a>
+<a class="milestone" href="/milestone/woo" title="Due in 17 years (Nov 1, 2030, 11:59:58 AM)">Milestone Woo</a>
+<a class="milestone" href="/milestone/zoo" title="4 weeks late (Nov 1, 2013, 11:59:58 AM)">Milestone Zoo</a>
 </p>

comment:9 by Ryan J Ollos, 6 years ago

I suppose I could add another set of expected values for Babel ≥ 1.0. It might be nice if we could use a regex in the unit tests though in order to avoid needing multiple sets of expected values. I imagine support for that could be added to the trac.wiki.tests.formatter:WikiTestCase class.

What do you think would be the best fix?

Last edited 6 years ago by Ryan J Ollos (previous) (diff)

comment:10 by Jun Omae, 6 years ago

It would be good to simply use format_datetime with trac.test:locale_en in the same way as use of pretty_timedelta, see [735a29ed4/jomae.git].

comment:11 by Ryan J Ollos, 6 years ago

That looks good, thanks.

comment:12 by Ryan J Ollos, 6 years ago

Change from comment:10 committed to 1.0-stable in [12293] and merged to trunk in [12294].

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.
to as closed The owner will be changed from Ryan J Ollos 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.