Giter Site home page Giter Site logo

sergeyirl / redmine_loader Goto Github PK

View Code? Open in Web Editor NEW

This project forked from simonstearn1/redmine_loader

9.0 4.0 5.0 327 KB

Project plan loader plugin for redmine

Home Page: redmine_loader

License: BSD 3-Clause "New" or "Revised" License

Ruby 100.00%

redmine_loader's Introduction

Redmine Loader

My first attempt at hacking some ruby together. Probably full of stupid stuff, but it seems to work.

Essentially, and largely through the miracle of cut and paste, I took code from an open source app called trackrecord and reworked this as a Redmine plugin.

Supports XML files output by MS Project etc and does a simple load into a default tracker for the selected project.

Developed under Mac OS X. Tested on linux (fedora 11).

redmine_loader's People

Contributors

simonstearn1 avatar svvitale avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

redmine_loader's Issues

Support for reading trackers from Project XML File

Hi, first thanks for the good work. We need something like that here in my company. The only problem is:

We load each task with different trackers into redmine, and we need to import the tracker info from the project. I checked out your plugin and I'm doing the changes to implement that, but I would like to give you a patch to integrate into master branch. Is it possible? I don't want to fork again :P

Exporting results in error "NoMethodError (undefined method `to_time' for nil:NilClass)"

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 FROM settings �[0m
D, [2011-10-19T15:17:12.537958 #4200] DEBUG -- : �[4;35;1mUser Load (0.3ms)�[0m �[0mSELECT * FROM users WHERE (users.id = 3) AND (users.status = 1) AND ( (users.type = 'User' OR users.type = 'AnonymousUser' ) ) �[0m
D, [2011-10-19T15:17:12.539045 #4200] DEBUG -- : �[4;36;1mProject Load (0.3ms)�[0m �[0;1mSELECT * FROM projects WHERE (projects.id = 105) �[0m
D, [2011-10-19T15:17:12.540792 #4200] DEBUG -- : �[4;35;1mIssue Load (0.9ms)�[0m �[0mSELECT * FROM issues 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 * FROM issue_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 * FROM trackers 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 * FROM issues WHERE (parent_id=872) LIMIT 1�[0m
D, [2011-10-19T15:17:12.553178 #4200] DEBUG -- : �[4;35;1mIssueRelation Load (0.3ms)�[0m �[0mSELECT * FROM issue_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 * FROM issues WHERE (parent_id=874) LIMIT 1�[0m
D, [2011-10-19T15:17:12.558893 #4200] DEBUG -- : �[4;35;1mIssueRelation Load (0.3ms)�[0m �[0mSELECT * FROM issue_relations WHERE (issue_to_id =874 AND relation_type = 'precedes') �[0m
F, [2011-10-19T15:17:12.562664 #4200] FATAL -- :
NoMethodError (undefined method to_time' for nil:NilClass): vendor/plugins/redmine_loader/app/controllers/loader_controller.rb:365:ingenerate_xml'
vendor/plugins/redmine_loader/app/controllers/loader_controller.rb:357:in generate_xml' vendor/plugins/redmine_loader/app/controllers/loader_controller.rb:356:ineach'
vendor/plugins/redmine_loader/app/controllers/loader_controller.rb:356:in generate_xml' vendor/plugins/redmine_loader/app/controllers/loader_controller.rb:345:ingenerate_xml'
vendor/plugins/redmine_loader/app/controllers/loader_controller.rb:344:in generate_xml' vendor/plugins/redmine_loader/app/controllers/loader_controller.rb:328:inexport'
passenger (3.0.8) lib/phusion_passenger/rack/request_handler.rb:96:in process_request' passenger (3.0.8) lib/phusion_passenger/abstract_request_handler.rb:513:inaccept_and_process_next_request'
passenger (3.0.8) lib/phusion_passenger/abstract_request_handler.rb:274:in main_loop' passenger (3.0.8) lib/phusion_passenger/classic_rails/application_spawner.rb:321:instart_request_handler'
passenger (3.0.8) lib/phusion_passenger/classic_rails/application_spawner.rb:275:in send' passenger (3.0.8) lib/phusion_passenger/classic_rails/application_spawner.rb:275:inhandle_spawn_application'
passenger (3.0.8) lib/phusion_passenger/utils.rb:479:in safe_fork' passenger (3.0.8) lib/phusion_passenger/classic_rails/application_spawner.rb:270: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) lib/phusion_passenger/abstract_server.rb:180:instart'
passenger (3.0.8) lib/phusion_passenger/classic_rails/application_spawner.rb:149:in start' passenger (3.0.8) lib/phusion_passenger/spawn_manager.rb:219:inspawn_rails_application'
passenger (3.0.8) lib/phusion_passenger/abstract_server_collection.rb:132:in lookup_or_add' passenger (3.0.8) lib/phusion_passenger/spawn_manager.rb:214:inspawn_rails_application'
passenger (3.0.8) lib/phusion_passenger/abstract_server_collection.rb:82:in synchronize' passenger (3.0.8) lib/phusion_passenger/abstract_server_collection.rb:79:insynchronize'
passenger (3.0.8) lib/phusion_passenger/spawn_manager.rb:213:in spawn_rails_application' passenger (3.0.8) lib/phusion_passenger/spawn_manager.rb:132:inspawn_application'
passenger (3.0.8) lib/phusion_passenger/spawn_manager.rb:275:in handle_spawn_application' passenger (3.0.8) lib/phusion_passenger/abstract_server.rb:357:insend'
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) helper-scripts/passenger-spawn-server:99

I, [2011-10-19T15:17:12.564301 #4200] INFO -- : Rendering /opt/redmine-1.2.1d2/public/500.html (500 Internal Server Error)

undefined method firstname for nil:NilClass on line #171 new.html.erb

Bruno,

Not sure if here is the right place to report an issue or try to get some help. I'm facing this error message when I'm importing an XML project file.

Processing LoaderController#create (for 10.254.55.189 at 2011-02-21 20:30:57) [POST]
Parameters: {"project_id"=>"59", "action"=>"create", "authenticity_token"=>"QvFU2tvxE7HYe952zy5eq/J9cMkNf2kCaG7duqQZPyU=", "controller"=>"loader", "import"=>{"analyse"=>"Analyse", "xmlfile"=>#File:/tmp/RackMultipart25662-0}}
Rendering template within layouts/base
Rendering loader/new

ActionView::TemplateError (undefined method `firstname' for nil:NilClass) on line #171 of vendor/plugins/redmine_loader/app/views/loader/new.html.erb:
168: <%= text_field_tag( "import[tasks][#{ index }][percentcomplete]", h( task.percentcomplete ), { :size => 3 } ) %>
169:
170:
171: <%= loaderhelp_user_selector( "import[tasks][#{ index }][assigned_to]", @project ) %>
172:
173:
174: <%= hidden_field_tag( "import[tasks][#{ index }][predecessors]", h( task.predecessors.join(', ') ) ) %>

vendor/plugins/redmine_loader/app/helpers/loader_helper.rb:110:in `loaderhelp_user_selector'
vendor/plugins/redmine_loader/app/helpers/loader_helper.rb:110:in `sort'
vendor/plugins/redmine_loader/app/helpers/loader_helper.rb:110:in `loaderhelp_user_selector'
vendor/plugins/redmine_loader/app/views/loader/new.html.erb:171
vendor/plugins/redmine_loader/app/views/loader/new.html.erb:142:in `each'
vendor/plugins/redmine_loader/app/views/loader/new.html.erb:142
vendor/plugins/redmine_loader/app/views/loader/new.html.erb:63
vendor/plugins/redmine_loader/app/controllers/loader_controller.rb:94:in `create'
/usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/usr/lib/ruby/1.8/webrick/server.rb:162:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
/usr/lib/ruby/1.8/webrick/server.rb:95:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:92:in `each'
/usr/lib/ruby/1.8/webrick/server.rb:92:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:23:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:82:in `start'

Rendering /opt/redmine/public/500.html (500 Internal Server Error)
[2011-02-21 20:36:12] INFO going to shutdown ...

Any clue on this?

Thanks in advance and best regards

Fernando Possebon

redmine 2.2

Anyone knows?

I tried installing it on 2.2 but got this error:

uninitialized constant ActiveSupport::CoreExtensions
/opt/redmine-2.2/plugins/redmine_loader/init.rb:29
/opt/redmine-2.2/lib/redmine/plugin.rb:73:in `instance_eval'
/opt/redmine-2.2/lib/redmine/plugin.rb:73:in `register'
/opt/redmine-2.2/plugins/redmine_loader/init.rb:3
/opt/redmine-2.2/lib/redmine/plugin.rb:130:in `load'
/opt/redmine-2.2/lib/redmine/plugin.rb:121:in `each'
/opt/redmine-2.2/lib/redmine/plugin.rb:121:in `load'
/opt/redmine-2.2/config/initializers/30-redmine.rb:12
/var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/engine.rb:588
/var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/engine.rb:587:in `each'
/var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/engine.rb:587
/var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/initializable.rb:30:in `instance_exec'
/var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/initializable.rb:30:in `run'
/var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/initializable.rb:55:in `run_initializers'
/var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/initializable.rb:54:in `each'
/var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/initializable.rb:54:in `run_initializers'
/var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/application.rb:136:in `initialize!'
/var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/railtie/configurable.rb:30:in `send'
/var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/railtie/configurable.rb:30:in `method_missing'
/opt/redmine-2.2/config/environment.rb:14
/var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/application.rb:103:in `require'
/var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/application.rb:103:in `require_environment!'
/var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/application.rb:297:in `initialize_tasks'
Tasks: TOP => db:migrate_plugins => redmine:plugins:migrate => environment

My configuration is:

Environment:
  Redmine version                          2.2.0.stable
  Ruby version                             1.8.7 (x86_64-linux)
  Rails version                            3.2.9
  Environment                              production
  Database adapter                         MySQL
Redmine plugins:
  extended_fields                          0.2.1
  redmine_dnoise_workload                  0.0.1
  redmine_importer                         1.0
  redmine_plugin_views_revisions           0.0.1
  redmine_xls_export                       0.2.1

Otherwise, does anyone know an alternative solution for redmine 2.x to synchronize with openproj?

Thank you.

Error saving milestone

hi, when trying to save milestones an exception is thrown.
couldnt find how to solve it

DEBUG: Unable to import tasks:
C:/sergio/redmine/redmine-1.0.0/vendor/rails/activerecord/lib/active_record/validations.rb:1090:in save_without_dirty!' C:/sergio/redmine/redmine-1.0.0/vendor/rails/activerecord/lib/active_record/dirty.rb:87:insave_without_transactions!'
C:/sergio/redmine/redmine-1.0.0/vendor/rails/activerecord/lib/active_record/transactions.rb:200:in save!' C:/sergio/redmine/redmine-1.0.0/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:136:intransaction'
C:/sergio/redmine/redmine-1.0.0/vendor/rails/activerecord/lib/active_record/transactions.rb:182:in transaction' C:/sergio/redmine/redmine-1.0.0/vendor/rails/activerecord/lib/active_record/transactions.rb:200:insave!'
C:/sergio/redmine/redmine-1.0.0/vendor/rails/activerecord/lib/active_record/transactions.rb:208:in rollback_active_record_state!' C:/sergio/redmine/redmine-1.0.0/vendor/rails/activerecord/lib/active_record/transactions.rb:200:insave!'
C:/sergio/redmine/redmine-1.0.0/vendor/plugins/redmine_loader/app/controllers/loader_controller.rb:256:in create' C:/sergio/redmine/redmine-1.0.0/vendor/plugins/redmine_loader/app/controllers/loader_controller.rb:199:ineach'
C:/sergio/redmine/redmine-1.0.0/vendor/plugins/redmine_loader/app/controllers/loader_controller.rb:199:in create' C:/sergio/redmine/redmine-1.0.0/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:136:intransaction'
C:/sergio/redmine/redmine-1.0.0/vendor/rails/activerecord/lib/active_record/transactions.rb:182:in transaction' C:/sergio/redmine/redmine-1.0.0/vendor/plugins/redmine_loader/app/controllers/loader_controller.rb:198:increate'
C:/sergio/redmine/redmine-1.0.0/vendor/rails/actionpack/lib/action_controller/base.rb:1331:in send' C:/sergio/redmine/redmine-1.0.0/vendor/rails/actionpack/lib/action_controller/base.rb:1331:inperform_action_without_filters'
C:/sergio/redmine/redmine-1.0.0/vendor/rails/actionpack/lib/action_controller/filters.rb:617:in call_filters' C:/sergio/redmine/redmine-1.0.0/vendor/rails/actionpack/lib/action_controller/filters.rb:610:inperform_action_without_benchmark'
C:/sergio/redmine/redmine-1.0.0/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in perform_action_without_rescue' C:/sergio/redmine/redmine-1.0.0/vendor/rails/activesupport/lib/active_support/core_ext/benchmark.rb:17:inms'
C:/Ruby187/lib/ruby/1.8/benchmark.rb:308:in realtime' C:/sergio/redmine/redmine-1.0.0/vendor/rails/activesupport/lib/active_support/core_ext/benchmark.rb:17:inms'
C:/sergio/redmine/redmine-1.0.0/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in perform_action_without_rescue' C:/sergio/redmine/redmine-1.0.0/vendor/rails/actionpack/lib/action_controller/rescue.rb:160:inperform_action_without_flash'
C:/sergio/redmine/redmine-1.0.0/vendor/rails/actionpack/lib/action_controller/flash.rb:146:in perform_action' C:/sergio/redmine/redmine-1.0.0/vendor/rails/actionpack/lib/action_controller/base.rb:532:insend'
C:/sergio/redmine/redmine-1.0.0/vendor/rails/actionpack/lib/action_controller/base.rb:532:in process_without_filters' C:/sergio/redmine/redmine-1.0.0/vendor/rails/actionpack/lib/action_controller/filters.rb:606:inprocess'
C:/sergio/redmine/redmine-1.0.0/vendor/rails/actionpack/lib/action_controller/base.rb:391:in process' C:/sergio/redmine/redmine-1.0.0/vendor/rails/actionpack/lib/action_controller/base.rb:386:incall'
C:/sergio/redmine/redmine-1.0.0/vendor/rails/actionpack/lib/action_controller/routing/route_set.rb:437:in call' C:/sergio/redmine/redmine-1.0.0/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:87:indispatch'
C:/sergio/redmine/redmine-1.0.0/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:121:in _call' C:/sergio/redmine/redmine-1.0.0/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:130:inbuild_middleware_stack'
C:/sergio/redmine/redmine-1.0.0/vendor/rails/activerecord/lib/active_record/query_cache.rb:29:in call' C:/sergio/redmine/redmine-1.0.0/vendor/rails/activerecord/lib/active_record/query_cache.rb:29:incall'
C:/sergio/redmine/redmine-1.0.0/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in cache' C:/sergio/redmine/redmine-1.0.0/vendor/rails/activerecord/lib/active_record/query_cache.rb:9:incache'
C:/sergio/redmine/redmine-1.0.0/vendor/rails/activerecord/lib/active_record/query_cache.rb:28:in call' C:/sergio/redmine/redmine-1.0.0/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:incall'
C:/sergio/redmine/redmine-1.0.0/vendor/rails/actionpack/lib/action_controller/string_coercion.rb:25:in call' C:/Ruby187/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/head.rb:9:incall'
C:/Ruby187/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/methodoverride.rb:24:in call' C:/sergio/redmine/redmine-1.0.0/vendor/rails/actionpack/lib/action_controller/params_parser.rb:15:incall'
C:/sergio/redmine/redmine-1.0.0/vendor/rails/actionpack/lib/action_controller/session/cookie_store.rb:93:in call' C:/sergio/redmine/redmine-1.0.0/vendor/rails/actionpack/lib/action_controller/failsafe.rb:26:incall'
C:/Ruby187/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/lock.rb:11:in call' C:/Ruby187/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/lock.rb:11:insynchronize'
C:/Ruby187/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/lock.rb:11:in call' C:/sergio/redmine/redmine-1.0.0/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:106:incall'
C:/sergio/redmine/redmine-1.0.0/vendor/rails/railties/lib/rails/rack/static.rb:31:in call' C:/Ruby187/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb:46:incall'
C:/Ruby187/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb:40:in each' C:/Ruby187/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb:40:incall'
C:/sergio/redmine/redmine-1.0.0/vendor/rails/railties/lib/rails/rack/log_tailer.rb:17:in call' C:/Ruby187/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/content_length.rb:13:incall'
C:/Ruby187/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/handler/webrick.rb:50:in service' C:/Ruby187/lib/ruby/1.8/webrick/httpserver.rb:104:inservice'
C:/Ruby187/lib/ruby/1.8/webrick/httpserver.rb:65:in run' C:/Ruby187/lib/ruby/1.8/webrick/server.rb:173:instart_thread'
C:/Ruby187/lib/ruby/1.8/webrick/server.rb:162:in start' C:/Ruby187/lib/ruby/1.8/webrick/server.rb:162:instart_thread'
C:/Ruby187/lib/ruby/1.8/webrick/server.rb:95:in start' C:/Ruby187/lib/ruby/1.8/webrick/server.rb:92:ineach'
C:/Ruby187/lib/ruby/1.8/webrick/server.rb:92:in start' C:/Ruby187/lib/ruby/1.8/webrick/server.rb:23:instart'
C:/Ruby187/lib/ruby/1.8/webrick/server.rb:82:in start' C:/Ruby187/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/handler/webrick.rb:14:inrun'
C:/sergio/redmine/redmine-1.0.0/vendor/rails/railties/lib/commands/server.rb:111
C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require' C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:inrequire'
C:/sergio/redmine/redmine-1.0.0/script/server:3

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.