MantisBT - Third-party Modules
View Issue Details
0000620Third-party ModulesProject Importerpublic2010-11-03 10:332014-04-05 17:59
Reporterdananderson 
Assigned Tocaseydk 
PrioritynormalSeveritymajorReproducibilitysometimes
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000620: Importing tasks from another project leads to parent issues
DescriptionWe have a few template projects that we use as task import sources when we create projects. Frequently, the tasks get imported out of order so that a parent task gets imported after a child task and the child task maintains it's "original" parent task ID.

For example:

Template project:
Task 1 = parent
Task 2 = child (task_parent = 1)

New Project:
Task 3 = child (task_parent = 1)
Task 4 = parent
TagsNo tags attached.
related to 0000647closed trevormorse v2.2 Release (Closed) When importing tasks into new project tasks start/end dates are not recalculated based on new project's start date 
Attached Filespng web2project error.PNG (101,011) 1969-12-31 16:00
https://bugs.web2project.net/file_download.php?file_id=166&type=bug
png

Notes
(0001337)
husaragi   
2010-11-04 09:12   
(Last edited: 2010-11-04 10:40)
is there a workaround? manual fix for this when it happens?

[edit]

perfect. thanks for the info. we are about to go live with w2p and i wanted to make sure i could fix this manually in the mean time, since we are going to have a number of fairly complex templates.

(0001338)
dananderson   
2010-11-04 10:02   
(Last edited: 2010-11-04 10:27)
In some cases, I can fix it via re-associating them in the web interfaces. In other cases, I have to go into the database and

UPDATE tasks SET task_parent = 4 WHERE task_id = 3;

I can do a webex or provide a dump of the database if necessary.

(0001339)
robertbasic   
2010-11-04 12:32   
Hi!

Could you provide a database dump so I could reproduce the bug more precisely?

Thx!
(0001341)
dananderson   
2010-11-04 21:05   
Dump's too big to upload (2.2Mb). Can I e-mail it somewhere?
(0001342)
robertbasic   
2010-11-07 09:39   
uhm, sure. send it to robertbasic [dot] com [at] gmail [dot] com
(0001345)
robertbasic   
2010-11-08 05:45   
got your email, will look into it tonight. thx!
(0001346)
robertbasic   
2010-11-08 11:06   
There is indeed some strange things going on. Created a project based on a template. In the database everything looks good, but when viewing the newly created projects the children tasks get all messed up - children printed above parents, children from various depths printed on same levels, etc.

Working on it.
(0001347)
dananderson   
2010-11-08 11:08   
If you look in the database, some of the children have parent IDs pointing to the template project. Once those get updated to point to the respective parents in the current project, all is happy.
(0001348)
robertbasic   
2010-11-08 11:12   
I stand corrected, the issue really is during import. Just noticed one task points to a template task.

Thanks Dan!
(0001420)
trevormorse   
2010-12-08 15:38   
Hi Dan,

After some investigation, I have noticed some of the tasks in these projects are not valid(problems with dependencies, etc). This causes the save that is updating the task_parent to fail. The problem is that we are not recording and showing those errors to you. I'm going to work on fixing that.

Just as importantly, how did you create these projects/tasks initially? It sounds like we have a hole somewhere that is letting invalid tasks into the system.

Thanks,

Trevor
(0001421)
dananderson   
2010-12-09 02:58   
Most of the tasks/projects were imported from MS Project.
(0001427)
trevormorse   
2010-12-12 15:54   
Hi Dan,

I have updated the task import process to display any errors it encounters and to not create the project if there are errors.

Keith is going to look at the MS Project importer to fix the rest.

Thanks,

Trevor
(0001481)
dananderson   
2010-12-20 07:24   
I just created a project manually (no imports, etc), and I'm seeing the same behavior. One thing that I have noticed is that on the Dependencies page, if you want to make a task Dynamic, you can't have either of the radio buttons toggled but if you've accidentally toggled one, you can't untoggle it. Setting task_dynamic = 1 in the database fixes it, but that may be what's breaking the import, too. Seems like there's an underlying GUI design issue on the Dependencies page. There's a lot of times where changing something on that page silently fails.
(0001483)
trevormorse   
2010-12-21 03:47   
Hi Dan,

Are you still seeing this in 2.2 (released yesterday)? The silent failing was part of what I discovered while fixing the import tasks process and you should now get error messages when doing exactly as you mention here. If you still aren't see any error messages with 2.2 then let me know and I will look back into it!

Thanks,

Trevor
(0001484)
dananderson   
2010-12-21 04:32   
I've upgraded and I'm getting an error, but it's not clear what that error means or how to fix it.
(0001495)
trevormorse   
2010-12-23 04:52   
Hi Dan,

There is a bug in our translation layer that is causing the cryptic error messages you are seeing here. I've created another but report for that - http://bugs.web2project.net/view.php?id=666
(0001508)
dananderson   
2010-12-29 07:43   
After cleaning up (I thought) all of the "bad dependencies", I'm still seeing this issue. None of my dynamic tasks are dependent on another task. I'm not sure why that doesn't work here since it does work in MS Project and most other project management systems, but that seemed to be what was causing the previously mentioned error.
(0001509)
caseydk   
2010-12-29 11:37   
@dananderson

The issue was with the Project Importer which handles importing plans from MS Project. That fix is still on my agenda for this week.
(0001510)
dananderson   
2010-12-29 11:58   
For new projects imported, I can see that. Apparently I still have broken dependencies in projects that I thought I cleaned up (already in the system, just trying to copy tasks into another project) and I'm at a loss as to what's broken. I really don't want to re-create a few hundred tasks and dependencies by hand.

It also doesn't necessarily address why I can't have dynamic tasks be dependent on other tasks. That seems like it's a system limitation.
(0001523)
dananderson   
2011-01-06 12:13   
I've heard from several other individuals within my organization that importing tasks from template projects created within the system (not imported via the Project importer) are exhibiting this issue, too.
(0001524)
trevormorse   
2011-01-06 15:20   
Hi Dan,

Do any of these projects (the ones not imported from MS Project, but are causing problems during import) exist in the database dump you sent along earlier?

If not would it be possible to get that data?
(0001533)
dananderson   
2011-01-07 02:10   
I can provide a dump of the DB. It's a little over 5MB compressed.
(0001539)
trevormorse   
2011-01-08 08:17   
Can you email it to trevor [dot] morse [at] gmail [dot] com if your mail provider will allow an attachment of that size?
(0001560)
trevormorse   
2011-01-16 15:49   
Hi Dan,

I believe I have fixed this with this commit: https://github.com/trevormorse/web2project/commit/cc1156d10409f8c98960799c37c1d9ab2be18274

the main change was on line 676 of modules/tasks/tasks.class.php.

Could you verify this works for you as well?

Thanks!
(0001565)
dananderson   
2011-01-17 03:10   
I've made the change and I'll let you know.
(0001679)
caseydk   
2011-02-24 01:16   
Any update here?
(0001859)
caseydk   
2011-04-10 22:16   
The Project Importer is updated in SVN as of this evening.

Issue History
2010-11-03 10:33danandersonNew Issue
2010-11-04 09:12husaragiNote Added: 0001337
2010-11-04 10:02danandersonNote Added: 0001338
2010-11-04 10:27danandersonNote Edited: 0001338
2010-11-04 10:39husaragiNote Edited: 0001337
2010-11-04 10:40husaragiNote Edited: 0001337
2010-11-04 12:32robertbasicNote Added: 0001339
2010-11-04 21:05danandersonNote Added: 0001341
2010-11-07 09:39robertbasicNote Added: 0001342
2010-11-08 05:45robertbasicNote Added: 0001345
2010-11-08 11:06robertbasicNote Added: 0001346
2010-11-08 11:08danandersonNote Added: 0001347
2010-11-08 11:12robertbasicNote Added: 0001348
2010-11-24 23:35caseydkProjectv2.1 Release (Closed) => v2.2 Release (Closed)
2010-12-03 23:12caseydkRelationship addedrelated to 0000647
2010-12-08 15:38trevormorseNote Added: 0001420
2010-12-09 02:58danandersonNote Added: 0001421
2010-12-12 15:54trevormorseNote Added: 0001427
2010-12-12 15:54trevormorseStatusnew => assigned
2010-12-12 15:54trevormorseAssigned To => caseydk
2010-12-15 21:55caseydkProjectv2.2 Release (Closed) => Third-party Modules
2010-12-15 21:55caseydkCategoryProjects => Project Importer
2010-12-15 21:55caseydkProduct Versionv2.1 =>
2010-12-20 07:24danandersonNote Added: 0001481
2010-12-21 03:47trevormorseNote Added: 0001483
2010-12-21 04:32danandersonNote Added: 0001484
2010-12-21 04:33danandersonFile Added: web2project error.PNG
2010-12-23 04:52trevormorseNote Added: 0001495
2010-12-29 07:43danandersonNote Added: 0001508
2010-12-29 11:37caseydkNote Added: 0001509
2010-12-29 11:58danandersonNote Added: 0001510
2011-01-06 12:13danandersonNote Added: 0001523
2011-01-06 15:20trevormorseNote Added: 0001524
2011-01-07 02:10danandersonNote Added: 0001533
2011-01-08 08:17trevormorseNote Added: 0001539
2011-01-16 15:49trevormorseNote Added: 0001560
2011-01-17 03:10danandersonNote Added: 0001565
2011-02-24 01:16caseydkNote Added: 0001679
2011-04-10 22:16caseydkNote Added: 0001859
2011-04-10 22:16caseydkStatusassigned => resolved
2011-04-10 22:16caseydkResolutionopen => fixed
2014-04-03 14:36caseydkStatusresolved => closed
2014-04-05 17:59caseydkCategoryGeneral => Project Importer