View Issue Details

IDProjectCategoryView StatusLast Update
0009651mantisbtotherpublic2008-12-16 08:38
Reporterjcw Assigned Tojreese  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.1.2 
Target Version1.1.6Fixed in Version1.1.6 
Summary0009651: Version copy from parent project copies incorrect date
Description

This is an attempt to re-open issue 9037 and 8880 as the issue is marked resolved/closed but I am still experiencing the problem.

PHP 5.2.6
MySQL 5.0.45

I downloaded 1.1.2 today and installed, discovering this bug as I was learning how to utilize MantisBT.

Steps To Reproduce

1.) Create a project
2.) Create a subproject under the first project
3.) Create version entries in the parent project
4.) Copy version entries from parent project to subproject

Additional Information

Please advise if further information is required.

Tagspatch
Attached Files

Relationships

related to 0009307 closedgiallu Copy Version from produce incorrect timestamp 
related to 0008880 closedgiallu Problem with date formatting in db_prepare_date function 
has duplicate 0009889 closedjreese Dates corrupted after copying versions 
has duplicate 0010348 closedgiallu Timestamp when Copying Target Versions 

Activities

jcw

jcw

2008-09-21 19:34

reporter   ~0019419

CORRECTION:

ISSUE 9307 should be referenced instead of 9037. I made a typo in the original notes;

===============================================

As the reporting user indicated in bug 9307, the offending code appears to be:

Current Code

manage_proj_ver_copy.php

foreach ( $t_rows as $t_row ) {
if ( version_is_unique( $t_row['version'], $t_dst_project_id ) ) {
version_add( $t_dst_project_id, $t_row['version'], $t_row['released'], $t_row['description'], $t_row['date_order'] );
}
}

Proposed Code [on issue 9037]

manage_proj_ver_copy.php

foreach ( $t_rows as $t_row ) {
if ( version_is_unique( $t_row['version'], $t_dst_project_id ) ) {
version_add( $t_dst_project_id, $t_row['version'], $t_row['released'], $t_row['description'], db_date($t_row['date_order']) );
}
}

artgroup

artgroup

2008-09-22 19:33

reporter   ~0019429

Last edited: 2008-09-22 19:34

I fixed with this piece of code.. in version_api.php

change line 132 to:
$c_date_order = db_timestamp(db_date( $p_date_order ));
from the original:
db_timestamp( $p_date_order );

i hope this help..

rramthun

rramthun

2008-11-03 06:35

reporter   ~0019763

This problem persists with 1.1.4.

The first copy operation sets the version dates to 1222, if you copy these copied version entries again, it doesnt work at all, as there seems to be an underflow and a DB columns gets null, which leads to an exception.

jcw

jcw

2008-11-03 14:44

reporter   ~0019769

Confirmed that proposed fix by Artgroup was insufficient to resolve issue. Please re-evaluate proposed solution above <a href="http://www.mantisbt.org/bugs/view.php?id=9307">0009037</a>

stefang

stefang

2008-11-25 04:27

reporter   ~0020020

I can confirm that this issue is solved in Mantis v1.1.5 by the proposed fix from JCW in note (0019419) above:

====================================================================
manage_proj_ver_copy.php

foreach ( $t_rows as $t_row ) {
if ( version_is_unique( $t_row['version'], $t_dst_project_id ) ) {
version_add( $t_dst_project_id, $t_row['version'], $t_row['released'], $t_row['description'], db_date($t_row['date_order']) );
}
}

jcw

jcw

2008-11-25 10:56

reporter   ~0020034

Credit for finding the bug should go to mgstm who originally reported the issue on issue # 9307.

jreese

jreese

2008-11-25 14:13

reporter   ~0020039

Targetting for 1.1.6. This fix should also be ported to the development branch as well.

grangeway

grangeway

2008-11-30 07:34

reporter   ~0020152

Fixed in GIT trunk

Related Changesets

MantisBT: master 12e2ca76

2008-11-30 07:34

Paul Richards


Details Diff
fix 0009651: Version copy from parent project copies incorrect date Affected Issues
0009651
mod - manage_proj_ver_copy.php Diff File

MantisBT: master-1.1.x f38422b6

2008-11-30 07:34

Paul Richards


Details Diff
fix 0009651: Version copy from parent project copies incorrect date Affected Issues
0009651
mod - manage_proj_ver_copy.php Diff File