Edgewall Software
Modify

Opened 16 years ago

Closed 16 years ago

#7648 closed defect (fixed)

Milestone completion time not shown when editing milestone

Reported by: ebray Owned by: ebray
Priority: low Milestone: 0.11.2
Component: roadmap Version: 0.11.1
Severity: minor Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

When marking a milestone as completed the current date is shown but not the current time.

Likewise, when editing an existing milestone the date is displayed by not the time. And on the roadmap page, only the milestone's completion date is shown.

This is just a simple matter of changing some formate_dates to format_datetime.

Attachments (0)

Change History (9)

in reply to:  description comment:1 by Remy Blank, 16 years ago

Milestone: 0.11.3
Owner: set to Remy Blank

Replying to ebray:

And on the roadmap page, only the milestone's completion date is shown.

I suppose this one is by design, as the hour doesn't give much additional information in an overview page anyway.

This is just a simple matter of changing some formate_dates to format_datetime.

Do you happen to know exactly which ones? Would save me the time to find out by myself :-)

comment:2 by ebray, 16 years ago

Well, at least this much ought to be changed:

  • trac/ticket/templates/milestone_edit.html

     
    6262            <label>
    6363              <input type="text" id="completeddate" name="completeddate"
    6464                     size="${len(datetime_hint)}" title="Format: ${datetime_hint}"
    65                      value="${format_date(milestone.completed) or format_date}" />
     65                     value="${format_datetime(milestone.completed)}" />
    6666              <em>Format: ${datetime_hint}</em>
    6767            </label>
    6868            <py:if test="milestones">

That or format_date bit doesn't even make sense. (Maybe it was supposed to be format_date()?) It doesn't matter because if the milestone isn't completed, milestone.completed will resolve to None.

comment:3 by Christian Boos, 16 years ago

Annotate shows it's a mistake coming from [3935/sandbox/datetime-genshi/trac/ticket/templates/milestone_edit.html]: it used to be datetime_now.

We could use format_date(datetime.now()).

(Note: the [3935/trunk/trac/ticket/templates/milestone_edit.html] link produces an error which is another symptom of #7744)

comment:4 by ebray, 16 years ago

What I'm saying though is that it's not necessary to explicitly call datetime.now() because it's already built into to_datetime(), and by extension format_datetime() when it's passed None as its first argument. So as it is in the above diff works as expected—gives the current date/time if the milestone isn't already completed. Not that it's a big deal—you could always just as well be more explicit.

comment:5 by Christian Boos, 16 years ago

Milestone: 0.11.30.11.2
Owner: changed from Remy Blank to ebray

You're right, no need for the or.

comment:6 by Christian Boos, 16 years ago

Resolution: fixed
Status: newclosed

Patch applied in [7623].

in reply to:  6 ; comment:7 by Remy Blank, 16 years ago

Resolution: fixed
Status: closedreopened

Replying to cboos:

Patch applied in [7623].

Err… I think what Erik was asking to fix was to insert the date and the time instead of the date only, i.e. use format_datetime() instead of format_date(). This changeset doesn't address this.

in reply to:  7 comment:8 by Christian Boos, 16 years ago

Replying to rblank:

Replying to cboos:

Patch applied in [7623].

Err… I think what Erik was asking to fix was to insert the date and the time instead of the date only, i.e. use format_datetime() instead of format_date(). This changeset doesn't address this.

Right, I just addressed the "at least" part of comment:2.

As one can specify the date and time for the milestone completed field, I think we should show it. Probably not on the Roadmap page, is it's just an overview, but the Milestone page itself should show the detail.

See also related #6369, discussing doing the same (setting date and time) for the due field.

comment:9 by Christian Boos, 16 years ago

Resolution: fixed
Status: reopenedclosed

Fixed in r7638.

Modify Ticket

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