Edgewall Software
Modify

Ticket #7648 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

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:
Release Notes:
API 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

Change History

comment:1 in reply to: ↑ description Changed 4 years ago by rblank

  • Milestone set to 0.11.3
  • Owner set to rblank

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 Changed 4 years ago by ebray

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 Changed 4 years ago by cboos

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 Changed 4 years ago by ebray

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 Changed 4 years ago by cboos

  • Milestone changed from 0.11.3 to 0.11.2
  • Owner changed from rblank to ebray

You're right, no need for the or.

comment:6 follow-up: Changed 4 years ago by cboos

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

Patch applied in [7623].

comment:7 in reply to: ↑ 6 ; follow-up: Changed 4 years ago by rblank

  • Resolution fixed deleted
  • Status changed from closed to reopened

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.

comment:8 in reply to: ↑ 7 Changed 4 years ago by cboos

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 Changed 4 years ago by cboos

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

Fixed in r7638.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
to The owner will be changed from ebray. Next status will be 'closed'
Author


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

 
Note: See TracTickets for help on using tickets.