Modify

Opened 2 years ago

Last modified 6 months ago

#10626 new defect

Calendar field for dates always displays DD/MM/YYYY, regardless of plugin settings

Reported by: adam.dorsey@… Owned by: anbo
Priority: normal Component: ProjectPlanPlugin
Severity: normal Keywords:
Cc: anbo Trac Release:

Description

When modifying a date in a ticket using the (awesome) pop-up calendar, the date format in the calendar is DD/MM/YYYY. This is despite the plugin being set to use the MM/DD/YYYY format.

Attachments (0)

Change History (11)

comment:1 follow-up: Changed 20 months ago by falkb

I have DD.MM.YYYY and I cannot change that format. Though it's not supported by this plugin, right? Anyway the combobox does not offer such choice.

comment:2 Changed 20 months ago by falkb

  • Cc anbo added; anonymous removed

comment:3 in reply to: ↑ 1 Changed 20 months ago by falkb

Replying to falkb:

I have DD.MM.YYYY and I cannot change that format.

sorry, I mean %Y-%m-%d

comment:4 Changed 20 months ago by anbo

  • Owner changed from makadev to anbo
  • Status changed from new to assigned

related to #10382

comment:5 Changed 20 months ago by anbo

(In [13092]) v1.2.0, minor release

changes:

  • improved the behavior of the javascript date picker (now beta), refs #10626:
    • now using jQuery date picker
    • now allowing more date formats
  • date format, refs #10382:
    • now the date format YYYY-MM-DD is allowed

comment:6 Changed 20 months ago by anbo

  • Resolution set to worksforme
  • Status changed from assigned to closed

The calendar field will now work with other date formats as well. Please do not hesitate to report any error you are observing.

comment:7 Changed 19 months ago by falkb

  • Resolution worksforme deleted
  • Status changed from closed to reopened

if use_ajax_for_fetching_reports is enabled, Error: report (of ProjectPlan) could not be rendered. is displayed; if it's disabled, this traceback appears:

[2013-05-14 09:08:27,473 p3492:t2984] formatter.py:768 ERROR: Macro ProjectPlan(combine_filters=AND,filterlike_milestone=123 - Foo - X5,segments=20/02/2012;21/02/2012;22/02/2012;23/02/2012;24/02/2012,renderer=tableticketperuserday,owners=falkb;test,cssclass=blacktable, useimages=Y, summary=chart,showaggregatedstate=T,statistics=elapsed_time/estimated_time) failed: 
Traceback (most recent call last):
  File "build\bdist.win32\egg\trac\wiki\formatter.py", line 765, in _macro_formatter
    return macro.ensure_inline(macro.process(args))
  File "build\bdist.win32\egg\trac\wiki\formatter.py", line 356, in process
    text = self.processor(text)
  File "build\bdist.win32\egg\trac\wiki\formatter.py", line 343, in _macro_processor
    text)
  File "build\bdist.win32\egg\projectplan\projectplan.py", line 385, in expand_macro
    return ProjectPlanGenerator.get_html( macroenv, formatter.req, content )
  File "build\bdist.win32\egg\projectplan\projectplan.py", line 472, in get_html
    renderer.render( ts ),
  File "build\bdist.win32\egg\projectplan\pprender.py", line 1173, in render
    return self.concreteRenderer.render( ticketset )
  File "build\bdist.win32\egg\projectplan\renderer\ppticketsperuserday.py", line 262, in render
    if  self.showAggregatedTicketState()  and  calendar[segment]['date'] < currentDate:
TypeError: can't compare datetime.date to NoneType

comment:8 Changed 19 months ago by falkb

Also, a newly created ticket contains the strings "YYYY-MM-DD" in custom ticket fields 'userstart' and 'userfinish' now!

comment:9 Changed 19 months ago by anbo

  • Status changed from reopened to new

I have added a v1.2.0 a new date string (YYYY-MM-DD). If recognized it is added to your 'userstart' and 'userfinish' fields. That is an intended behavior.

comment:10 Changed 19 months ago by falkb

Please, don't automatically add that format string "YYYY-MM-DD" to both ticket fields on ticket creation. It breaks other plugins (e.g. JsGanttChartPlugin). At least, do not add _format_ strings but proper datetime _values_ instead, though I don't want that a plugin automatically adds values to my tickets because usually I do not want to set both fields.

comment:11 Changed 6 months ago by jan.krotky

+1 to remove the default string values. In our workflow new tickets shouldn't have any date set, it's up to project manager to add it to schedule later. And now it's only confusing because of the parse error (not a date) on creation. The format should be the same for all dates used by plugin and saved in [pp_options] section

Add Comment

Modify Ticket

Action
as new The owner will remain anbo.
Author


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

 
Note: See TracTickets for help on using tickets.