256MbTeam / Redmine-Scrumbler

Easy to use plugin for Redmine. It allows users to use the Scrum/Agile process in projects. Scrumbler have interactive dashboard with the ability to configure for each sprint. Plugin adds Scrum Points field in every issue in project. Scrumbler as possible using the standard redmine structure of projects.
GNU General Public License v2.0
111 stars 41 forks source link

Support for Redmine 2.0.0? #75

Open jpijuan opened 12 years ago

jpijuan commented 12 years ago

Hi,

Are there any plans on the horizon to support redmine version 2.0.0?

Thanks!

kWhittington commented 12 years ago

I have a similar request, although 2.0.1 would be super awesome!

I'm trying to get the latest Scrumbler build to work with a Redmine 2.0.1 but with no luck. After "solving" the Dispatcher problem with some code I found online, I run into a "undefined local variable or method 'redmine_scrumbler' for #ActionDispatch::Reloader:0x007fdfb9518da8".

As much as I'd like to contribute at this point I think it is better left to the professionals.

GL and thanks for your hard work guys!

volmer commented 12 years ago

+1 for this! Would be awesome to use scrumbler under Redmine 2.0.1.

Milwalkee commented 12 years ago

+1 for this!

pedrosnk commented 12 years ago

I didn't see this Issue created so I did a pull request into a new one. https://github.com/256MbTeam/Redmine-Scrumbler/pull/77

Here there is a fork of scrumbler runing into redmine 2.0.1 (latest) https://github.com/ebc/Redmine-Scrumbler

Milwalkee commented 12 years ago

Hi pedrosnk

i've tried the fork, but it won't work in my env. (tested current master and 3 months old realse) getting: rake db:migrate:plugin NAME=redmine_scrumbler rake aborted! cannot load such file -- dispatcher

I can't create a issue in your fork so I'm not sure if I shall post the full trace output here in this issue.

Please leave me a message where i shall post the info maybe it can help to fix the bug.

pedrosnk commented 12 years ago

Hello,

I'm sorry, I believe that the reason for that is that is because there's no dispatcher dependency on redmine-2.X or on rails 3.2. And at the time I couldn't find a properly replacement for the dispatcher that is used at the last version of scrumbler. I believe that by commenting the line

require 'dispatcher'

on the file init.rb will do the work. But we still have to find a better way to substitute that. Because I couldn't find out a better way to replace the dispatcher api at the init.rb, the code will not run properly on development mode. But will work ok on production.

I will take a look at that later today, but I believe that with my last commit, by commenting the line I mention it will work. https://github.com/ebc/Redmine-Scrumbler

Milwalkee commented 12 years ago

Hello,

I believe that this won't work in production.

When I try to run this with:

require 'dispatcher'

rake db:migrate:plugin NAME=redmine_scrumbler RAILS_ENV=production

I got: Plugin redmine_scrumbler was not found. So I think it won't work with this "quickfix"

Thanks for your help!

pedrosnk commented 12 years ago

I've talked with volmer and he came out with a solution for the dispatcher compatibility.

Apparently, on rails 3 it was removed and now is replaced by the command Rails.application.config.to_prepare do

My last change is working fine now.

For the plugin migration command, it changed on redmine-2.X now the new command to migrate plugins is

rake redmine:plugins:migrate

Just don't forget to run the migration of redmine first with

rake db:migrate

please, let me known if something went wrong. :)

Milwalkee commented 12 years ago

Awesome! It works :)

volmer commented 12 years ago

Nice job!

Sprocketjoo commented 12 years ago

Just checked out https://github.com/ebc/Redmine-Scrumbler.

After doing:

rake redmine:plugins:migrate RAILS_ENV=production rake db:migrate RAILS_ENV=production

(restart server)

When I try to activate the plugin in any projects, I get an Internal Error. The log says:

Processing by ProjectsController#modules as HTML Parameters: {"authenticity_token"=>"Ihwx0C4dUBHWDXrLjjEMBmqvrOHRfu8AhR7zqeu3wTI=", "enabled_module_names"=>["issue_tracking", "time_tracking", "news", "documents", "files", "wiki", "repository", "boards", "calendar", "gantt", "redmine_scrumbler"], "id"=>"neuron-datagroups", "utf8"=>"\u2713", "commit"=>"Save"} Completed 500 Internal Server Error in 308ms

NameError (uninitialized constant Project::ScrumblerProjectSetting): app/models/project.rb:581:in enabled_module_names=' app/controllers/projects_controller.rb:208:inmodules'

pedrosnk commented 12 years ago

Hello Sprocketjoo ,

I've just tested the plugin with redmine-2.0.3 and it was working fine at my environment, could you provide some more information about your environment? Like the version of redmine you are using, and the kind of database (sqlite, mysql, postgres).

The only things that I could see that is different is the name of the plugin, that must be separated by underscore and in lowercase (execute the line bellow at the redmine_instalation/plugins )

git clone git://github.com/256MbTeam/Redmine-Scrumbler.git  redmine_scrumbler

and the order of the migrations and the name of the plugin.

rake db:migrate

and then execute

rake redmine:plugins:migrate

please, check if the migrations of the scrumbler will appear.

Pease, try to execute these steps above and if the error persists let me known.

Sprocketjoo commented 12 years ago

It's working now! Yes, it was something related to the name of the plugin. It was named "Redmine_Scrumbler" in the previous installation (ebc repository). Thanks so much!!

I am currently using the plugin for the first time, and it is absolutely promising. However, I have a minor problem:

In the dashboard, the issues are correctly updated but the hyperlink to the issue is wrong:

Actual issue link in my production environment: http://10.128.39.16/redmine/issues/3663

Dashboard issue link (broken): http://10.128.39.16/issues/3663

The same lack of "redmine" directory in urls happen in Tracker links in Dashboard, and some images in Backlog:

http://10.128.39.16/images/2downarrow.png

Instead of:

http://10.128.39.16/redmine/images/2downarrow.png

Thanks in advance!

Sprocketjoo commented 12 years ago

For the record, I have configured Apache to access Redmine this way:

VirtualHost *:80

ServerName localhost

 DocumentRoot /var/www/    
 <Directory /var/www/redmine/>
 Options FollowSymLinks
     AllowOverride None
 Order deny,allow
 Allow from all
 </Directory>

 RailsEnv production
 RailsBaseURI /redmine
 PassengerDefaultUser apache

VirtualHost

dextervip commented 12 years ago

Hi,

I can't get it working, when I go to http://domain.com/redmine/projects/project/scrumbler_backlogs and try to add new issue, I get the following error from firebug: "NetworkError: 404 Not Found - http://domain.com/projects/project/scrumbler_backlogs/create_issue"

Seems plugin doesn't get my base url http://domain.com/redmine/

Sprocketjoo commented 12 years ago

Hi,

As a workaround, I changed variable Scrumbler.root_url from "\" to "\redmine\" in plugins/redmine_scrumbler/app/helpers/scrumbler_helper.rb.

Now I found another minor Issue, the buttons to move issues in Backlog column don't work (sprint column is fine). Log:

Started POST "/redmine/projects/neuron/scrumbler_backlogs/move_issue_priority" for 10.128.72.76 at Wed Jun 27 11:08:11 +0200 2012 Processing by ScrumblerBacklogsController#move_issue_priority as JS Parameters: {"issue_action"=>"lower", "project_id"=>"neuron", "sprint_id"=>"1", "issue_id"=>"2410"} Completed 500 Internal Server Error in 41ms

ArgumentError (Unknown key: where): activesupport (3.2.5) lib/active_support/core_ext/hash/keys.rb:51:in assert_valid_keys' activesupport (3.2.5) lib/active_support/core_ext/hash/keys.rb:50:ineach_key' activesupport (3.2.5) lib/active_support/core_ext/hash/keys.rb:50:in assert_valid_keys' activerecord (3.2.5) lib/active_record/relation/spawn_methods.rb:132:inapply_finder_options'

dextervip commented 12 years ago

No real solution yet?

Tiennd commented 12 years ago

I also encountered all above issues with Redmine 2.0.2. It seems that this Scrumler plugin is not completely migrated for Redmine 2.x yet

Any good idea here?

Thanks,

mellowgeek commented 12 years ago

I've gotten Scrumbler working on a Bitnami Redmine 2.0.3 virtual machine running Ubuntu 12.04. Here's what I did to get it working, hope this helps.

For the URL issue, as mentioned above, modify plugins/redmine_scrumbler/app/helpers/scrumbler_helper.rb:

Scrumbler.root_url from "/" to "/redmine/"

For the item moving button images, in plugins/redmine_scrumbler/assets/javascripts/scrumbler-backlog.js on line 265:

change

src: '/images/'+config.image

to

src: Scrumbler.root_url + '/images/'+config.image

And for the error with changing the item priority in the backlog with the buttons, in redmine_scrumbler/lib/infectors/issue.rb: Change on line 77

scope :without_version, :where => {:fixed_version_id => nil}

to

scope :without_version, where(:fixed_version_id => nil)
Tiennd commented 12 years ago

Thank mellowgeek for your reponse. Could you help me to check the last one again (scope :without_version, where(:fixed_version_id => nil)). It seems that there is a mistake here.

Thanks,

mellowgeek commented 12 years ago

It works for me, do you have any details on what error you're getting?

Edit: I just noticed that there's still a bug in the backlog. If you don't have a sprint created, when you use the move buttons, the tasks disappear from the page.

ycdesu commented 12 years ago

@mellowgeek : I've the same issue as @Tiennd and there're not any errors in redmine/log/production.log. My tasks also disappear from the page and have to refresh that page to show them again. What informations should I post to help everyone debug these issues? thanks.

ghost commented 12 years ago

So scrumbler now depends on Rails version 3.*? Then maybe someone should update the requirements.

I'm running Redmine 1.3.0 on Rails 2.3.14 and can't get scrumbler to install because of the removed Dispatcher dependency. Or did I miss something?