剛剛 upgrade redmine 之後發現的,
看起來是因為 pre-0.9 的關係把回溯相容性拔掉了,
其實蠻久之前 Enumeration 的 API 就有變動的樣子,
只是 Stuff To Do 的作者一直沒有修,
已經有人在 forum 上提供 patch 了:
RE: Enumeration API change in r2472 - undefined method 'get_values'
1 2 3 4 5 6 7 8 9 10 11 12 13 |
--- a/app/models/stuff_to_do_filter.rb +++ b/app/models/stuff_to_do_filter.rb @@ -27,7 +27,9 @@ class StuffToDoFilter private # Wrapper around Redmine's API since Enumerations changed in r2472 def get_priorites - if Enumeration.respond_to?(:priorities) + if IssuePriority.respond_to?(:all) + return IssuePriority.all + elsif Enumeration.respond_to?(:priorities) return Enumeration.priorities else return Enumeration::get_values('IPRI') |