Closed yzzy closed 4 years ago
For those who have problems applying this changes.
Check rsb files for newline symbol at the end of file.
Remove them if they exists or change line 18 in the file lib/redmine_tags/patches/api_template_handler_patch.rb
to
template.source.sub!(lines.last.strip, lines.join) unless lines.empty?
(add .strip to lines.last)
Thank you for your patience !
I think that there is something wrong with this issue, because the /projects.json endpoint raises a 500 error when others modules are installed.
When redmine_canned_responses is installed https://github.com/commandprompt/redmine_canned_responses curl
App 17103 output: I, [2020-09-13T06:32:07.833207 #17103] INFO -- : Started GET "/projects.json" for 83.38.157.49 at 2020-09-13 06:32:07 +0000
App 17103 output: I, [2020-09-13T06:32:07.834043 #17103] INFO -- : Processing by ProjectsController#index as JSON
App 17103 output: I, [2020-09-13T06:32:07.838023 #17103] INFO -- : Current user: admin (id=1)
App 17103 output: I, [2020-09-13T06:32:07.843417 #17103] INFO -- : Rendering projects/index.api.rsb
App 17103 output: I, [2020-09-13T06:32:07.891674 #17103] INFO -- : Rendered projects/index.api.rsb (48.2ms)
App 17103 output: I, [2020-09-13T06:32:07.891811 #17103] INFO -- : Completed 500 Internal Server Error in 58ms (ActiveRecord: 3.1ms)
App 17103 output: F, [2020-09-13T06:32:07.892863 #17103] FATAL -- :
App 17103 output: F, [2020-09-13T06:32:07.892889 #17103] FATAL -- : ActionView::Template::Error (undefined method `render_api_redmine_tags' for #<#<Class:0x0000562b03b22238>:0x0000562b032142e0>
App 17103 output: Did you mean? render_api_includes):
App 17103 output: F, [2020-09-13T06:32:07.892943 #17103] FATAL -- : 13: render_api_custom_values project.visible_custom_field_values, api
App 17103 output: 14: render_api_includes(project, api)
App 17103 output: 15:
App 17103 output: 16: api.created_on project.created_on
App 17103 output: 17: api.updated_on project.updated_on
App 17103 output: 18: end
App 17103 output: 19: end
App 17103 output: F, [2020-09-13T06:32:07.892959 #17103] FATAL -- :
App 17103 output: F, [2020-09-13T06:32:07.892969 #17103] FATAL -- : app/views/projects/index.api.rsb:16:in `block (4 levels) in _27171045b848e14f069ad3d26d5c29f7'
App 17103 output: lib/redmine/views/builders/structure.rb:74:in `method_missing'
App 17103 output: app/views/projects/index.api.rsb:3:in `block (3 levels) in _27171045b848e14f069ad3d26d5c29f7'
App 17103 output: app/views/projects/index.api.rsb:2:in `each'
App 17103 output: app/views/projects/index.api.rsb:2:in `block (2 levels) in _27171045b848e14f069ad3d26d5c29f7'
App 17103 output: lib/redmine/views/builders/structure.rb:35:in `array'
App 17103 output: app/views/projects/index.api.rsb:1:in `block in _27171045b848e14f069ad3d26d5c29f7'
App 17103 output: lib/redmine/views/builders.rb:36:in `for'
App 17103 output: app/views/projects/index.api.rsb:1:in `_27171045b848e14f069ad3d26d5c29f7'
And the use of alias_method_chain causes another issues.
Implemented the ability of fetching tags for
Issue
andProject
through?include=tags
as mentioned in #127