気づき #751
奈良 裕記 さんが約6年前に更新
PluginのRedmine本体バージョン間設計変更点収集(Redmine3.x/Rails4)
Redmineバージョン間の変更により、結果的にPluginに不具合が発生し、
運用コストが増える事が良くあります。
そのようなロスを減らすため、対応に必要な情報を収集蓄積してみます。(試行)
対応方法が判れば、修正待ちではなく、自分で修正し動かすことも可能になる筈。
記入項目(案)
* 変更があったバージョン:項目名
* Redmine本体側変更内容(RAILS.Ruby変更含)
* Plugin側の変更方法、発生条件
* 対応サンプル
* 補足
---
h1. 関連資料
Rails アップグレードガイド
https://railsguides.jp/upgrading_ruby_on_rails.html
Redmine4時代のプラグイン開発
https://www.slideshare.net/douhashi/redmine4-redminetokyo-13
P55
Rails5で消えるAPI
before_filter after_filter
alias_method_chain
https://www.slideshare.net/naitoh1/redmine-260-300newfeature
P30 Redmine3プラグイン対応の壁
Rails3.2->Rails4.1
routing match廃止(RAILS4)
---
h1. Redmine3.4:Use safe_attributes for user preferences
h2. 本体側変更
Use safe_attributes for user preferences.
http://www.redmine.org/projects/redmine/repository/revisions/15688
h2. Plugin側の変更方法、発生条件
user preferencesの設定に、safe_attributes を利用する。
h2. 対応サンプル
https://github.com/haru/redmine_theme_changer/issues/1
https://github.com/haru/redmine_theme_changer/commit/ab1b5f4f4193004845c74ac6ee81dd43c5dc66f3
h2. 補足
---
h1. Redmine3.4:ActionView::Template::Error (undefined method `remote' for #<Hash:)
h2. 本体側変更
http://www.redmine.org/issues/26637
QueryFilter#remote is defined at source:tags/3.4.2/app/models/query.rb#L192 .
↑の変更箇所
http://www.redmine.org/projects/redmine/repository/revisions/16170
Don't preload all filter values when displaying issues/time entries
http://www.redmine.org/issues/24787
> Possible values for all filters are currently preloaded and included in the view as JSON objects when listing issues or time entries.
> This can be slow when there are many projects or users. Adding new filters (eg. #17720) would also add more overhead.
> The values for a given filter should be loaded when a user adds the filter only, by using an AJAX request .
h2. Plugin側の変更方法、発生条件
h2. 対応サンプル
h2. 補足
---
h1. Redmine3.0:findの対応
h2. 本体側変更
Redmine本体ではなくRails側変更による
h2. Plugin側の変更方法、発生条件
find→find_by、where、、
h2. 対応サンプル
https://github.com/haru/redmine_theme_changer/commit/f00b1a71dadd58f285b2a24d3f82acb1360488e7
https://github.com/tkusukawa/redmine_work_time/commit/19e3e110708fcdeaf77cca4eb24a851a96d4c6dc
---
h1. Redmine3.0:attr_accessible
h2. 本体側変更:
h2. Plugin側の変更方法、発生条件
modelにattr_accessible で定義追加する
h2. 対応サンプル
https://github.com/tkusukawa/redmine_work_time/commit/19e3e110708fcdeaf77cca4eb24a851a96d4c6dc
---
h1. Redmine3.0:routing
h2. 本体側変更:
h2. Plugin側の変更方法、発生条件
config/routes.rb routing情報 :via追加
h2. 対応サンプル
https://github.com/akiko-pusu/redmine_banner/commit/0b77e7fc094665ae841a862a34251b43f450fb26
戻る