View Issue Details

IDProjectCategoryView StatusLast Update
0023606mantisbtadministrationpublic2017-12-30 18:36
Reportermokraemer Assigned Toatrol  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionunable to reproduce 
Product Version2.8.0 
Summary0023606: editing an existing version corrupts date field
Description

if you edit an existing version the date field is shown in native format (dd.mm.yy) not the expected iso format (yyyy-mm-dd).

Steps To Reproduce

show mantisbt in e.g. german version. go to administration, select a project, add a version & edit.
In my case the field date shows "8-11-20 11:41" which is not in the correct format, since today is "2017-11-08 11:41"

If you edit an existing entry, the date field is also corrupted. If you just save this entry, it is set to the current date!

TagsNo tags attached.
Attached Files

Relationships

related to 0023578 closeddregad Document need for consistency between "normal" and "datepicker" date formats 
related to 0022827 closedatrol Wrong dates in "Edit Project Version" 

Activities

atrol

atrol

2017-11-08 05:55

developer   ~0058160

I am not able to reproduce the issue using the given information.
0023578 might be related.

mokraemer

mokraemer

2017-11-08 06:51

reporter   ~0058163

I think this is exactly the issue. I didn't find this one.
When is the release of 2.9?

atrol

atrol

2017-11-08 06:57

developer   ~0058164

0023578 does not change any functionality, this is just a documentation change.
See documentation of $g_datetime_picker_format and the new warning for it http://mantisbt.org/docs/master/en-US/Admin_Guide/html-desktop/#admin.config.date

mokraemer

mokraemer

2017-11-08 07:46

reporter   ~0058165

Oh I see.
in my config the dateformat is defined as the following:
$g_short_date_format = 'd.m.Y';
$g_normal_date_format = 'd.m.Y H:i';
$g_complete_date_format = 'd.m.Y H:i T';

This is common format in germany.

I've attached you some screenshots, you can see the original date and what the dialog/selector looks like.
After saving (the "unchanged date"), it becomes the current date.

a.png (3,273 bytes)   
a.png (3,273 bytes)   
b.png (2,236 bytes)   
b.png (2,236 bytes)   
c.png (16,058 bytes)   
c.png (16,058 bytes)   
atrol

atrol

2017-12-27 05:10

developer   ~0058443

I am not able to reproduce your issue, at least if I am following the documentation mentioned at 0023606:0058164 which tells you

This format needs to match the one defined in $g_normal_date_format

I don't see any problem when setting

$g_datetime_picker_format = 'DD-MM-YYYY HH:mm'; 
mokraemer

mokraemer

2017-12-28 06:21

reporter   ~0058446

But the dateformat is
"d.m.Y H:i", as it is common in germany.

I've solved the problem by changing the format to "Y-m-d", which is easier for sorting.

atrol

atrol

2017-12-28 06:34

developer   ~0058447

Last edited: 2017-12-28 06:43

I am not sure if you read the documentation, especially the note

The formatting convention for the DateTime picker is different from the one used for the other date settings described above

The picker date setting uses this format http://momentjs.com/docs/#/displaying/format/
whereas all other date settings use ISO8601 format https://en.wikipedia.org/wiki/ISO_8601

Can I set the issue to resolved, or do you think there is something wrong in Mantis?

mokraemer

mokraemer

2017-12-28 06:38

reporter   ~0058448

I think it is still an issue, but since I was the only one, close it for now, I'm ok with it.

atrol

atrol

2017-12-28 07:11

developer   ~0058449

What's wrong when using the following settings?
Isn't this what you wanted before?

$g_short_date_format = 'd.m.Y';
$g_normal_date_format = 'd.m.Y H:i';
$g_complete_date_format = 'd.m.Y H:i T';
$g_datetime_picker_format = 'DD.MM.YYYY HH:mm';
mokraemer

mokraemer

2017-12-28 08:13

reporter   ~0058450

if you use them, the datepicker doesn't work correctly, as shown in the picture.

atrol

atrol

2017-12-28 10:21

developer   ~0058451

I tried again using Firefox 57, Chrome 63 and Safari 11 and was not able to reproduce the issue.

Set to resolved as mentioned at 0023606:0058448