Comments (10)
Hello, I have the same question if this plugin is ever going to become compatible with
Redmine version 3.4.4.stable
Ruby version 2.5.0-p0 (2017-12-25) [x86_64-linux]
Rails version 4.2.8
from redmine_backlogs.
who can help me? can you have aother useful version?tkx.
from redmine_backlogs.
I almost got this working on redmine 4.
Check out wyplay's fork -
https://github.com/wyplay/redmine_backlogs.git
it almost works, you need to change the ActiveRecord::Migration parts to have a version -
grep -rl "ActiveRecord::Migration$" db | xargs sed -i "$@" "s/ActiveRecord::Migration/ActiveRecord::Migration[5.1]/g"
and you need to remove the unnecessary 3 database commits in 012_migrate_legacy.rb -
ActiveRecord::Base.connection.commit_db_transaction
run the migrate -
bundle exec rake redmine:db:migrate NAME=redmine_backlogs RAILS_ENV=production
then if it fails with a dependent index_issues_on_position error, just drop that index and re run the migrate.
Then it at least installs, unfortunately it then complains in the config page in the browser -
Internal error
An error occurred on the page you were trying to access.
If you continue to experience problems please contact your Redmine administrator for assistance.If you are the Redmine administrator, check your log files for details about the error.
and the log says -
Processing by SettingsController#plugin as HTML
Parameters: {"id"=>"redmine_backlogs"}
Current user: admin (id=1)
Rendering settings/plugin.html.erb within layouts/admin
Rendered plugins/redmine_backlogs/app/views/backlogs/_settings.html.erb (30.6ms)
Rendered settings/plugin.html.erb within layouts/admin (33.2ms)
Completed 500 Internal Server Error in 45ms (ActiveRecord: 10.7ms)
ActionView::Template::Error (undefined method `each' for 26:Integer):
52: <% if !Backlogs.configured? %>
53: <fieldset>
54: <legend>Backlogs was not properly set up</legend>
55: <%- if !Backlogs.migrated? %>
56: <p>Plugin migrations have not been executed</p>
57: <%- end %>
58: <table>
plugins/redmine_backlogs/lib/backlogs_setup.rb:154:in `migrated?'
from redmine_backlogs.
If you edit "plugins/redmine_backlogs/lib/backlogs_setup.rb"
and comment out the def migrated? stanza like this -
def migrated?
#available = Dir[File.join(File.dirname(__FILE__), '../db/migrate/*.rb')].collect{|m| Integer(File.basename(m).split('_')[0].gsub(/^0+/, ''))}.sort
#return true if available.size == 0
#available = available[-1]
#ran = []
#Setting.connection.execute("select version from schema_migrations where version like '%-redmine_backlogs'").each{|m|
# ran << Integer((m.is_a?(Hash) ? m.values : m)[0].split('-')[0])
#}
#return false if ran.size == 0
#ran = ran.sort[-1]
#return ran >= available
return 1
end
module_function :migrated?
then at least you can get into the settings page. errors following that appear to be partly due to not having any data in the tables in the database though.
from redmine_backlogs.
Hi FooBarTrixbell,
The "errors following that" means like this?
ActiveRecord::StatementInvalid (TinyTds::Error: A constant expression was encountered in the ORDER BY list, position 1.: EXEC sp_executesql N'SELECT [versions].* FROM [versions] WHERE [versions].[status] IN (N''open'', N''locked'') AND [versions].[project_id] = 4 ORDER BY CASE versions.sprint_start_date WHEN NULL THEN 1 ELSE 0 END ASC, versions.sprint_start_date ASC, CASE versions.effective_date WHEN NULL THEN 1 ELSE 0 END ASC, versions.effective_date ASC'): plugins/redmine_backlogs/app/models/rb_story.rb:152:in
backlogs_by_sprint'
plugins/redmine_backlogs/app/controllers/rb_master_backlogs_controller.rb:12:in show' lib/redmine/sudo_mode.rb:63:in
sudo_mode'`
I got this error when i click "Backlogs" tab.
If so, how can I add data in database?
from redmine_backlogs.
I'm afraid to say, I was only looking at this as a proof of concept for the boss. He wanted an option for migrating away from Jira.
In the end he wasn't overly fond of redmine so we didn't put any serious effort into making it work.
I would start by running that query on your database and seeing what SQL error you get -
SELECT [versions].*
FROM [versions]
WHERE [versions].[status] IN ('open', 'locked')
AND [versions].[project_id] = 4
ORDER BY
CASE versions.sprint_start_date WHEN NULL THEN 1 ELSE 0 END ASC,
versions.sprint_start_date ASC,
CASE versions.effective_date WHEN NULL THEN 1 ELSE 0 END ASC,
versions.effective_date ASC
It looks to me like it is generating incorrect sql as CASE versions.sprint_start_date WHEN NULL THEN 1 ELSE 0 END ASC, will probably generate "Order by 0" or "Order by 1" which is just rubbish. probably doesn't happen when your DB is full though.
Perhaps grep for that line in the code and just comment it out, I don't see a reason for it anyway as the order by should not fail if there is nothing to order by.
from redmine_backlogs.
Looks like it is in plugins/redmine_backlogs/app/models/rb_sprint.rb
def self.by_date_clause
dir = Backlogs.setting[:sprint_sort_order] == 'desc' ? 'DESC' : 'ASC'
"CASE #{table_name}.sprint_start_date WHEN NULL THEN 1 ELSE 0 END #{dir},
#{table_name}.sprint_start_date #{dir},
CASE #{table_name}.effective_date WHEN NULL THEN 1 ELSE 0 END #{dir},
#{table_name}.effective_date #{dir}"
end
Perhaps change this to
def self.by_date_clause
dir = Backlogs.setting[:sprint_sort_order] == 'desc' ? 'DESC' : 'ASC'
"#{table_name}.sprint_start_date #{dir},
#{table_name}.effective_date #{dir}"
end
And try again?
from redmine_backlogs.
hmm, perhaps not, that ends up in
ORDER BY releases.release_start_date DESC, releases.name DESC, releases.release_end_date ASC, releases.release_start_date ASC'
and it doesn't like having the release start date in there twice!
from redmine_backlogs.
I could only get this to progress by disabling the sort function entirely -
scope :by_date, #-> { order(by_date_clause) }
at which point it is happy with the query (I think) but complains about labels.yaml being missing
A quick copy of the default file -
cp plugins/redmine_backlogs/lib/labels/labels.yaml.default plugins/redmine_backlogs/lib/labels/labels.yaml
and now it just gives a very generic error and I'm stumped, sorry.
Let me know if you progress it any!
from redmine_backlogs.
Thank you very much for you a lot of research.
Unfortunately, I couldn't solve this problem with and another error has emerged.
I didn't get the error about labels.yaml.
i will keep trying another way.
from redmine_backlogs.
Related Issues (20)
- Redmine: Filter chain halted as :check_enabled rendered or redirected Completed 403 Forbidden
- Cant hide custom fields
- redmine_backlogs HOT 2
- Does it support redmine3.3.x? HOT 5
- Settings - Backlogs version v1.0.6 (v1.0.6)
- redminebacklogs.net reads "buy this domain" HOT 1
- Documentation HOT 1
- Redmine 2.4.3, Ruby 1.9.3 - can't install
- backlogs_activerecord_mixin.rb causes an error HOT 4
- ArgumentError: The scope body needs to be callable. HOT 6
- Nice plugin
- got 500 error when i click 'sprints' menu HOT 1
- got 500 error when i click 'issues' menu HOT 1
- Toolbar Problem HOT 1
- Swagger - Update Api
- Redmine_backlog installation problem in Redmine 3.2.0
- Hi
- drag&drop doesn't work with project tree
- 'closed' versions or releases should be excluded from droppables
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from redmine_backlogs.