alphanodes / additionals

Redmine plugin for easy customization of settings, text and content display by using personal or role-based dashboards (drag&drop), providing wiki macros and act as library for other plugins.
https://www.redmine.org/plugins/additionals
GNU General Public License v2.0
130 stars 43 forks source link

Compatibility with plugin "redmine_ref_issues" #99

Open tianyang-abc opened 3 years ago

tianyang-abc commented 3 years ago

In Project Overview Page, when setting wiki macro {{ref_issues....}} of a TEXT (both non-async and async) dashboard block, it cannot display table body. After clicking the block editing "Save" buttom, it turns out all correct.

project_overview_wiki_macro_table_empty

While in Welcome page, the wiki macro {{ref_issues....}} works fine.

welcome_page_wiki_macro_display_OK

Any idea? I cannot see the different between ProjectsController and WelcomeController. Thanks!

alexandermeindl commented 3 years ago

Hi @tianyang-abc

thanks for reporting this!

I found the reason for the problem:

Redmine has an helper column_value in QueriesHelper (for issues) and with the same name column_value in ProjectsQueriesHelper (for projects). Both helpers are loaded in ProjectsController: https://github.com/redmine/redmine/blob/master/app/controllers/projects_controller.rb#L38

The projects controller is active on project overview page, in this case column_value for projects is used instead of column_value for issues. That's the reason why no data are visible.

I am not sure, if this problem is fixable. If ProjectsQueriesHelper and QueriesHelper are included, there is always a name conflict. Only stable solution would be, if in Redmine itself it would be a issue_column_value and a project_column_value (and not both with the same name column_value).

This problem exists without additionals (only with redmine_issue_ref plugin), too. If you would put an issue_ref macro in the project description, same case hits.

With an asynchronous TEXT block, its working for me. In this case QueriesHelper is loading first (from ashboardAsyncBlocksController). Maybe this is a workaround - use async to use ref_issues macro.