Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This plugin appears to break [redmine_multiprojects_issue] #9

Closed
chrislockwood opened this issue Feb 13, 2021 · 7 comments
Closed

This plugin appears to break [redmine_multiprojects_issue] #9

chrislockwood opened this issue Feb 13, 2021 · 7 comments
Labels
compatibility wontfix This will not be worked on

Comments

@chrislockwood
Copy link
Contributor

I am unclear on the exact issue, presumably something method overload related, also not sure which maintainer is best placed to investigate/workaround the problem.

nanego/redmine_multiprojects_issue#48 (comment)

In my case the multiproject_issue plugin solves a significant project architectural headache, but I would very much like to use tagging in conjunction, both offer superb functionality.

@chrislockwood
Copy link
Contributor Author

Environment:
  Redmine version                4.1.1.stable
  Ruby version                   2.6.6-p146 (2020-03-31) [x64-mingw32]
  Rails version                  5.2.4.2
  Environment                    production
  Database adapter               SQLServer
  Mailer queue                   ActiveJob::QueueAdapters::AsyncAdapter
  Mailer delivery                smtp
SCM:
  Git                            2.29.2
  Filesystem                     
Redmine plugins:
  additionals                    3.0.2-master
  redmine_banner                 0.3.4
  redmine_base_deface            1.5.3
  redmine_base_stimulusjs        1.1.1
  redmine_embed_html5_video      0.0.3
  redmine_impersonate            2.0.0
  redmine_mentions               0.0.1
  redmine_multiprojects_issue    4.1.0
  redmine_silencer               0.4.3
  redmine_smile_project_enumerations_custom_field_format 1.3.14
  redmine_sudo                   1.0.0
  redmine_theme_changer          0.4.0
Completed 500 Internal Server Error in 663ms (ActiveRecord: 330.1ms)
  
ActionView::Template::Error (super: no superclass method `column_content' for #<#<Class:0x000000000df9a710>:0x000000000cfb9b20>
Did you mean?  column_content_without_tags):
    33:   <% end %>
    34:   <tr id="issue-<%= issue.id %>" class="hascontextmenu <%= cycle('odd', 'even') %> <%= issue.css_classes %> <%= level > 0 ? "idnt idnt-#{level}" : nil %>">
    35:     <td class="checkbox hide-when-print"><%= check_box_tag("ids[]", issue.id, false, :id => nil) %></td>
    36:     <% query.inline_columns.each do |column| %>
    37:     <%= content_tag('td', column_content(column, issue), :class => column.css_classes) %>
    38:     <% end %>
    39:     <td class="buttons"><%= link_to_context_menu %></td>
  
plugins/redmine_multiprojects_issue/lib/redmine_multiprojects_issue/queries_helper_patch.rb:18:in `column_content'
plugins/additional_tags/lib/additional_tags/patches/queries_helper_patch.rb:35:in `column_content_with_tags'
plugins/redmine_multiprojects_issue/lib/redmine_multiprojects_issue/queries_helper_patch.rb:18:in `column_content'

@alexandermeindl
Copy link
Contributor

alexandermeindl commented Feb 13, 2021

Hi @chrislockwood

we use alias_method here, because this is compatible with redmineup helpdesk plugin. Problem is, a plugin can use alias_method or super - you have to decide to. redmine_multiprojects_issue uses super, which is the modern, preferred way.

The problem is, we cannot drop redmineup helpdesk support at the moment. I suppose there is no solution at the moment to use redmine_multiprojects_issue and additional_tags together.

@chrislockwood
Copy link
Contributor Author

Very much appreciate the swift response, and I completely understand the requirement to maintain compatibility with other plugins.

I do like the reasons given under the "why another tag plugin" section, the promise of a stable/maintained product is everything we hope for these days, in the future perhaps you guys will find a way to adopt the "modern, preferred way" without breaking compatibility elsewhere.

In the meantime keep up the good work!

@chrislockwood
Copy link
Contributor Author

...perhaps something similar to the hooks_mode option mentioned here could be a feasible future implementation (unsure on the maintenance overhead).

@alexandermeindl
Copy link
Contributor

alexandermeindl commented Feb 14, 2021

Hi @chrislockwood
this solution would only work (partly) with the approach to provide both solutions (alias and prepend) for the specific method, which should be overwritten. To provide a prepend AND a alias_method solution.

And, you (the user, which wants to install the plugin) has to create a configuration file for it. This makes the installation more difficult.
There would be another problem: this is not a solution, if 3 plugins wants to overwrite a specific method. E.g. additional_tags, redmine_multiprojects_issue and redmine_contacts_helpdesk would not work with this solution.
At the moment I have no idea how this problem could be fixed for Redmine plugins. I do not see it, that all developers will use the same approach, if there are more then one.
Some developers (companies) are not willing to change the code for compatibility reasons. In the past we tried it some times and we got the another: "our plugin works, try it without the other plugins" 😞

The change in column_content (the method, which both plugins tries to overwrite with different approaches) is required for tags. A solution would be to find a possibility without to use column_content.:

Another solution would be that Redmine provides a better solutions to customize for methods, which are popular for plugin developers (e.g. there are very often query helpers as column_value or column_content). I created a patch as proposal on redmine.org for that: https://www.redmine.org/issues/34743. With this patch, the problem would be solvable by plugin developers.

@chrislockwood
Copy link
Contributor Author

Hi @alexandermeindl

Appreciate your feedback on this, along with the patch submission, we can only hope that it is integrated in a timely fashion.

In the meantime perhaps another workaround can be found, though presumably only in the form of plugin developers working together. It would be good to have one tag plugin which has universal compatibility, because really this should be a core Redmine feature.

@alexandermeindl
Copy link
Contributor

Hi @chrislockwood

sure, this would great. You can try do convince RedmineUp to use prepend instead of alias. This would be a great step, because RedmineUp plugins are used in many installations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility wontfix This will not be worked on
Development

No branches or pull requests

2 participants