Open cforce opened 12 years ago
I located the bugs in loader_controller.rb Seems as version.effective_date, issue.start_date and issue.due_date get tot checkd if they are set before time conversion. I added an "if issue.start_date" or if "issue.due_date" or "if version.effective_date" behind these lines. to check before. No i can export an xml. But am not sure if Ms Project will allow xml files without that xml elements. So far these attributes are not mandatory in redmine, so an exporter can expect them to be set. It must be checked and maybe setting to "0" will be better for Ms project import compatability than not set them in the xml. Maybe ist not possible at all to import task or versions wthout dates, so this items muts be skipped completly, but that would be bad to sync status of both tools.
You can try my fork.
Unfortunately, there still many issues with MS Project itself, we can't make it to import XML properly.
The bugs i reported are on ur fork. Would be great if you enable githubs issue module so i can report and push there.
Which bugs are open. Please write a list, so we know what shall be fixed
I, [2011-10-19T15:17:12.535035 #4200] INFO -- :
Processing LoaderController#export (for 172.25.252.11 at 2011-10-19 15:17:12) [POST] I, [2011-10-19T15:17:12.535182 #4200] INFO -- : Parameters: {"project_id"=>"105", "action"=>"export", "authenticity_token"=>"ZwyelCuZL2eqMe0uAgGAVjDAyGok7RtwA60uTUJOmjQ=", "controller"=>"loader", "export"=>"Export Issue"} D, [2011-10-19T15:17:12.536731 #4200] DEBUG -- : [4;36;1mSQL (0.6ms)[0m [0;1mSELECT max(
settings
.updated_on) AS max_updated_on FROMsettings
[0m D, [2011-10-19T15:17:12.537958 #4200] DEBUG -- : [4;35;1mUser Load (0.3ms)[0m [0mSELECT * FROMusers
WHERE (users
.id
= 3) AND (users.status = 1) AND ( (users
.type
= 'User' ORusers
.type
= 'AnonymousUser' ) ) [0m D, [2011-10-19T15:17:12.539045 #4200] DEBUG -- : [4;36;1mProject Load (0.3ms)[0m [0;1mSELECT * FROMprojects
WHERE (projects
.id
= 105) [0m D, [2011-10-19T15:17:12.540792 #4200] DEBUG -- : [4;35;1mIssue Load (0.9ms)[0m [0mSELECT * FROMissues
WHERE (issues
.project_id = 105) ORDER BY id, issues.created_on DESC[0m D, [2011-10-19T15:17:12.545138 #4200] DEBUG -- : [4;36;1mIssueStatus Load (0.5ms)[0m [0;1mSELECT * FROMissue_statuses
WHERE (issue_statuses
.id
IN (14,9,1,5)) [0m D, [2011-10-19T15:17:12.547021 #4200] DEBUG -- : [4;35;1mTracker Load (0.3ms)[0m [0mSELECT * FROMtrackers
WHERE (trackers
.id
IN (1,2,3,4)) [0m D, [2011-10-19T15:17:12.552330 #4200] DEBUG -- : [4;36;1mIssue Load (3.8ms)[0m [0;1mSELECT * FROMissues
WHERE (parent_id=872) LIMIT 1[0m D, [2011-10-19T15:17:12.553178 #4200] DEBUG -- : [4;35;1mIssueRelation Load (0.3ms)[0m [0mSELECT * FROMissue_relations
WHERE (issue_to_id =872 AND relation_type = 'precedes') [0m D, [2011-10-19T15:17:12.557940 #4200] DEBUG -- : [4;36;1mIssue Load (3.8ms)[0m [0;1mSELECT * FROMissues
WHERE (parent_id=874) LIMIT 1[0m D, [2011-10-19T15:17:12.558893 #4200] DEBUG -- : [4;35;1mIssueRelation Load (0.3ms)[0m [0mSELECT * FROMissue_relations
WHERE (issue_to_id =874 AND relation_type = 'precedes') [0m F, [2011-10-19T15:17:12.562664 #4200] FATAL -- : NoMethodError (undefined methodto_time' for nil:NilClass): vendor/plugins/redmine_loader/app/controllers/loader_controller.rb:365:in
generate_xml' vendor/plugins/redmine_loader/app/controllers/loader_controller.rb:357:ingenerate_xml' vendor/plugins/redmine_loader/app/controllers/loader_controller.rb:356:in
each' vendor/plugins/redmine_loader/app/controllers/loader_controller.rb:356:ingenerate_xml' vendor/plugins/redmine_loader/app/controllers/loader_controller.rb:345:in
generate_xml' vendor/plugins/redmine_loader/app/controllers/loader_controller.rb:344:ingenerate_xml' vendor/plugins/redmine_loader/app/controllers/loader_controller.rb:328:in
export' passenger (3.0.8) lib/phusion_passenger/rack/request_handler.rb:96:inprocess_request' passenger (3.0.8) lib/phusion_passenger/abstract_request_handler.rb:513:in
accept_and_process_next_request' passenger (3.0.8) lib/phusion_passenger/abstract_request_handler.rb:274:inmain_loop' passenger (3.0.8) lib/phusion_passenger/classic_rails/application_spawner.rb:321:in
start_request_handler' passenger (3.0.8) lib/phusion_passenger/classic_rails/application_spawner.rb:275:insend' passenger (3.0.8) lib/phusion_passenger/classic_rails/application_spawner.rb:275:in
handle_spawn_application' passenger (3.0.8) lib/phusion_passenger/utils.rb:479:insafe_fork' passenger (3.0.8) lib/phusion_passenger/classic_rails/application_spawner.rb:270:in
handle_spawn_application' passenger (3.0.8) lib/phusion_passenger/abstract_server.rb:357:in__send__' passenger (3.0.8) lib/phusion_passenger/abstract_server.rb:357:in
server_main_loop' passenger (3.0.8) lib/phusion_passenger/abstract_server.rb:206:instart_synchronously' passenger (3.0.8) lib/phusion_passenger/abstract_server.rb:180:in
start' passenger (3.0.8) lib/phusion_passenger/classic_rails/application_spawner.rb:149:instart' passenger (3.0.8) lib/phusion_passenger/spawn_manager.rb:219:in
spawn_rails_application' passenger (3.0.8) lib/phusion_passenger/abstract_server_collection.rb:132:inlookup_or_add' passenger (3.0.8) lib/phusion_passenger/spawn_manager.rb:214:in
spawn_rails_application' passenger (3.0.8) lib/phusion_passenger/abstract_server_collection.rb:82:insynchronize' passenger (3.0.8) lib/phusion_passenger/abstract_server_collection.rb:79:in
synchronize' passenger (3.0.8) lib/phusion_passenger/spawn_manager.rb:213:inspawn_rails_application' passenger (3.0.8) lib/phusion_passenger/spawn_manager.rb:132:in
spawn_application' passenger (3.0.8) lib/phusion_passenger/spawn_manager.rb:275:inhandle_spawn_application' passenger (3.0.8) lib/phusion_passenger/abstract_server.rb:357:in
send' passenger (3.0.8) lib/phusion_passenger/abstract_server.rb:357:inserver_main_loop' passenger (3.0.8) lib/phusion_passenger/abstract_server.rb:206:in
start_synchronously' passenger (3.0.8) helper-scripts/passenger-spawn-server:99I, [2011-10-19T15:17:12.564301 #4200] INFO -- : Rendering /opt/redmine-1.2.1d2/public/500.html (500 Internal Server Error)