Closed hokreb closed 6 years ago
I am not sure, if I have realized the problem correctly, but as far as I have understood the code, the problem lies in the _tree_node.html.haml file.
I changed the following part of the code:
%td.id
= link_to issue.id, controller: 'issues', action: 'show', id: issue
- cols = query.inline_columns.map do |column|
- unless column.value(issue) == issue.id
- "<td class=\"#{column.css_classes}\">#{column_content(column, issue)}</td>"
= raw cols.join
to
%td.id
= link_to issue.to_param, controller: 'issues', action: 'show', id: issue
- cols = query.inline_columns.map do |column|
- unless "#{column.value(issue)}" == "#{issue.to_param}"
- "<td class=\"#{column.css_classes}\">#{column_content(column, issue)}</td>"
= raw cols.join
With these changes, the redmine_issues_tree plugins work with the issue_id plugin installed, and also without the issue_id plugin installed (tested with redmine version 3.4.3 stable). The issue_id plugin seems to replace the issue id column value with a string type, so that the "unless" statement has no effect anymore, and an additional column will be inserted. According to the author of the issue_id plugin, one can replace the issue.id with issue.to_param, and than the issue - id will be always correctly set (if the issue_id plugin is not installed, than the unique number will be returned, if the issue_id plugin is installed, than the project specific issue_id will be return, which contains the text project issue-prefix).
It would be nice, if you can say, how I should procede. Are you interested to incorporate these small changes into your source code? Or do you like it more, that I do a fork and add there these changes?
best regards
nhok
Thanks for a report and for an investigation of the problem. Now I'm working on compatibility with Redmine 3.4. After this task I will try to reproduce your problem and look at your solution closely. But for a first view, solution looks ok. Anyway, as a result I'll make a commit with bugfix for all supported versions.
Fixed for all 3.x versions. Changes will be added to the next plugin version.
When used in combination with the ISSUE-id plugin (https://github.com/s-andy/issue_id, http://projects.andriylesyuk.com/project/redmine/issue-id) the view with active tree view is falsly displayed.
I know, this is not a "fault" of this plugin, it is more the consequences from the changes made by the issue_id plugin, but maybe there is a way to change issue tree plugin, to also work with the issue-id plugin. I will try to search for a solution, but I am a very very early beginner in case of ruby/rails/redmine, so I am not convinced, that I am able to find a solution.