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_date
s to format_datetime
.
Attachments (0)
Change History (9)
comment:1 by , 16 years ago
Milestone: | → 0.11.3 |
---|---|
Owner: | set to |
comment:2 by , 16 years ago
Well, at least this much ought to be changed:
-
trac/ticket/templates/milestone_edit.html
62 62 <label> 63 63 <input type="text" id="completeddate" name="completeddate" 64 64 size="${len(datetime_hint)}" title="Format: ${datetime_hint}" 65 value="${format_date (milestone.completed) or format_date}" />65 value="${format_datetime(milestone.completed)}" /> 66 66 <em>Format: ${datetime_hint}</em> 67 67 </label> 68 68 <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 , 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 , 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 , 16 years ago
Milestone: | 0.11.3 → 0.11.2 |
---|---|
Owner: | changed from | to
You're right, no need for the or
.
follow-up: 7 comment:6 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Patch applied in [7623].
follow-up: 8 comment:7 by , 16 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:8 by , 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 offormat_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.
Replying to ebray:
I suppose this one is by design, as the hour doesn't give much additional information in an overview page anyway.
Do you happen to know exactly which ones? Would save me the time to find out by myself :-)