MantisBT - v3.0 Release
View Issue Details
0001342v3.0 Release[All Projects] Generalpublic2013-06-26 03:442013-08-28 11:17
Reporteropto 
Assigned Tocaseydk 
PrioritynormalSeveritycrashReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version3.0.0 
Summary0001342: importtasks broken (dates unusable)
Descriptionsee forums:

 importtask does some crazy date shifting.

part of the problem is that it takes the difference between old task start and new project start.

Also, it changes the task end not by shifting same as task start, but by adding start + duration (see my othetr post), which is wrong if the user has decided that end notequal start + duration (= scenario: I work 1 hour on this task in the next 10 days).

Don't have time to relly dig into this function.
A fast workaround is to shift all task dates (start and end) by the datedifference

new project tsart - old project start.

The resukt at least looks similiar to what I expect, dates are still shifted by 1 day but that could be adjusting to working days.

Keith, what did you intent with your date handling?

If anybody is interested, I could upload this to my git.


Klaus
TagsNo tags attached.
child of 0001217closed caseydk dependency questions/confusions 
Attached Files

Notes
(0002948)
opto   
2013-06-28 08:40   
there is another bug:

1) start and end are shifted by offset. That is ok.
2) if new start is not a working day, it is shifted to a working day. But now the end date should be shifted by the same amount of days (or end date should be start date + no of working days in the oiginal project), otherwise, we shorten the days of the task by moving start e.g. from Sat to Mon.

Example: orig task June 11-14 2013: length is 4 working days.
Shift by 4 days: now Jun 15-18. But 15 is Sat, so also start shifted to Mon 17th: task is now done in 2 working days compared to original done in 4 working days.

best is probably: shift start to working day, then end = start + number of original working days in task. and shift end to working day.

Klaus
(0002949)
opto   
2013-06-28 09:02   
ok, I have a fix by:

Datediff between date before and after workday shift.
add that diff to enddate
shift enddate to working day.

will try to upload to git

Klaus
(0002950)
opto   
2013-06-28 09:34   
fix see pull request id 1342
(0002969)
caseydk   
2013-07-25 21:20   
Resolved in part here:
https://github.com/web2project/web2project/commit/14f3d91b8d5d6d2c8204727ba32b3a06828968ce

I'll review PR 233 next: https://github.com/web2project/web2project/pull/233
(0002980)
caseydk   
2013-08-03 22:40   
Reworked this whole thing in the latest development. You can see the changes in Github but here's one of the most important ones:
https://github.com/web2project/web2project/commit/3fd12443a1330d86a5997c9f571935e8e7773ab0

Issue History
2013-06-26 03:44optoNew Issue
2013-06-28 08:40optoNote Added: 0002948
2013-06-28 09:02optoNote Added: 0002949
2013-06-28 09:34optoNote Added: 0002950
2013-06-28 09:34optoStatusnew => assigned
2013-06-28 09:34optoAssigned To => caseydk
2013-07-25 21:20caseydkNote Added: 0002969
2013-08-03 15:12caseydkRelationship addedchild of 0001217
2013-08-03 22:40caseydkNote Added: 0002980
2013-08-03 22:40caseydkStatusassigned => resolved
2013-08-03 22:40caseydkResolutionopen => fixed
2013-08-28 11:14caseydkFixed in Version => 3.0.0
2013-08-28 11:17caseydkStatusresolved => closed