-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compatible with Redmine 2.x #30
Comments
hello, logical-and, I add a routes.rb in config folder,and it can be add module in redmine 2.0.3, but, when i enter the module under the project, they are blank. May you give me some advice? |
Hi Mikewolfli! I can remember this problem. I dont know what really changed in Ruby or Rails (I am not Ruby programmer), but found the root of the evil. =) Look on the form open - it need to opened (open and output) with <%= , not <% I try this way (editing and fixing), and think that better way can be found. Look on this commit: ksauzz@49d078f Try to use https://github.com/ksauzz/redmine_importer/tree/redmine2.x instead. It seems to be compatible with Redmine 2.x. Wait for your reply. =) |
Hello logical-and. Thank you very much. I use this one https://github.com/ksauzz/redmine_importer/tree/redmine2.x. And it works very well. my environment is : |
Hello logical-and. Thank you very much. I use this one https://github.com/ksauzz/redmine_importer/tree/redmine2.x. And it does not work. My environment is: Error information: NameError (uninitialized constant ImporterController::CSV): activesupport (3.2.6) lib/active_support/callbacks.rb:458:in `_run__233701135__process_action__999454627__callbacks' activesupport (3.2.6) lib/active_support/callbacks.rb:405:in actionpack (3.2.6) lib/action_controller/metal/rescue.rb:29:in |
@mikewolfli, have you tried to import the files? Is it work properly? When I have tried to run the plugin, I got the problem as xiezj. When he solve this probled, he got the next error with String.force_encoding("UTF-8"). I google the probled and found, that only Ruby 1.9.x has this method. @xiezj, add Can we contact ksauzz? |
@logical-and The force_encoding error seems to be from empty cells -- here's my error log: Completed 500 Internal Server Error in 46ms ActionView::Template::Error (undefined method `force_encoding' for nil:NilClass): So in your CSV, make sure you don't have empty cells and try again, e.g. replace empty cells with text like "None". This worked for me. |
@dairong |
Hmm. @dairong === @Weddingful ? =) |
Haha yeah sorry. I work at Weddingful, so accidentally posted using our official account. |
@dairong Aha, ok. My environment: But no success on import. Yet. |
sorry, logical-and, Yesterday I just try to import one sample, but no success. I just search for the solution. |
I has installed the plugin,it sucessed. but it failed when i importered "csv" file (csv file=utf8) |
Removed my previous comment as weddingful, and recreated it here: My environment: Redmine 2.x edge from Github (git://github.com/redmine/redmine.git) |
@logical-and I added require 'csv' to importer_controller.rb , the same error information when i importered csv file |
@mikewolfli Ok, as I though. =) It look strange, if plugin work properly on author PC. I contact him later. @xiezj Paste, please, the code, where you added require 'csv' @dairong Ok. We know, you Dai Rong, now. =) |
@logical-and -- coding: utf-8 --require 'tempfile' class MultipleIssuesForUniqueValue < Exception class NoIssueForUniqueValue < Exception |
Ok, guys. I've update my environment, add require 'csv' to file top and it works now. Environment: Redmine version 2.0.2.stable Ruby version 1.9.3 (x86_64-linux) Rails version 3.2.5 Environment production Database adapter Mysql2 |
I also had to remove the references in importer_controller to the "fixed_version" objects (along with the rest of the comments here). Then it worked for me importing the demo standard CSV file, with no Version info. |
hmm... I also got the force_encoding error... I'm very new to the ruby environment so I might be a tad confused... Started POST "/importer/match" for 75.72.215.175 at Tue Jul 17 20:17:33 -0500 2012 NoMethodError (undefined method Environment: git branchmaster
*** LOCAL GEMS *** actionmailer (3.2.6) |
Hm I tried doing this based on here because "Ruby 1.8 doesn't have the concept of string encodings, so force_encoding would be a no-op" - http://stackoverflow.com/questions/4583924/string-force-encoding-in-ruby-1-8-7-or-rails-2-x class String and I got: Started POST "/importer/match" for 75.72.215.175 at Tue Jul 17 20:32:11 -0500 2012 CSV::IllegalFormatError (CSV::IllegalFormatError): |
I upgraded to Redmine 2.1.2 and I'm having all those issues described above. Now I'm at the place described by HongPong... Environment: And I'm using redmine_importer from redmine2.x branch. As you can see, I have pretty much plug-ins installed, but errors I get looks exactly as described above, so I don't think it is other-plugins-related. |
OK, in case someone else is also fighting to make it work with Ruby 1.8 and Redmine 2.x, here is my workaround:
This is work-around not solution. I'm neither Ruby nor Rails programmer. For decent solution one should probably get rid of observe_field and handle UTF-8 stuff in a way that would work for both Ruby 1.8 and 1.9. Here are patches for controller:
And match.html.erb
|
Thanks macmacy, the workaround seems to work for me. |
Hi! However when I try updating issues, I get this error:
This was my test: First import (unique-valued field is 'external_Id', ignoring 'id' field):
Second import (unique-valued field is 'external_Id', ignoring 'id' field, ticked 'Update existing issues' option)
I put some dumps into mailer.rb, i.e puts(object.inspect) and this is the output:
Am I missing something? Thank you! |
Hi,
It seems to be some incompatibilities on FasterCSV.new arguments. I've tried FasterCSV 1.5.3, 1.5.4, 1.5.5 (by bundle install | uninstall FasterCSV) but all with same result. Everytime I try to upload the csv file, there is a Internal Server Error 500 with the error mentioned above. |
hi all! i have 2 problem fot importer. Who can help me?Environment: when i import file csv it show or WHY?????????? Thanks so much |
@admin I same you too, what's your solution? could you help me? NoMethodError (undefined method |
Hi admin! Admin, could you help me for this problem ? i working on redmine 2.0.3 but I cant not update issue with importer. and my Environment: Redmine version 2.0.3.stable I have bug when i update issue, can you help me ? please .....please..... NoMethodError (undefined method strftime' for nil:NilClass): Thanks admin so much |
I had no luck with the prototype_legacy_helper plugin and got a 500 error while trying to access any Redmine site. I replaced the observe_field function block with this JS code:
|
@jisonnguyen You can ignore the missing translation error. Just make sure that you assign a unique column while you import the CSV, so that the plugin can know which issue you refer to. |
Bitnami latest stack over here.
redmine_importer throws (even with @macmacy path applied). ActionController::RoutingError (uninitialized constant ImporterController): |
First, I want to thank author for this module. Really necessary thing.
Are you planning to make the module compatible with Redmine 2.x? I can help you, if you need it, although Ruby isn`t my primary language.
Thanks!
The text was updated successfully, but these errors were encountered: