Defect #34743

Hooks for queries helper

Added by Alexander Meindl 8 months ago. Updated 3 months ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:Hook requests
Target version:5.0.0
Resolution:Fixed Affected version:

Description

Plugin developers very often overwrite queries helper column_value and column_content.

The problem is, that there two ways to overwrite it: prepend and alias_method. There is a conflict if one plugin uses prepend and the other plugin uses alias_method for the same method.

More and more plugins do not work together because of this reason. Because of this, there should be a better way to solve this wish to overwrite.

I added a patch to introduce two hooks, which could be used by plugin develops. With this approach there is no need for overwriting this method anymore.

queries_helper.patch Magnifier (3.87 KB) Alexander Meindl, 2021-02-14 08:06

34743-v2.patch Magnifier - patch by Alexander Meindl (3.63 KB) Go MAEDA, 2021-07-11 05:00

Associated revisions

Revision 21068
Added by Go MAEDA 3 months ago

Hooks for queries helper (#34743).

Patch by Alexander Meindl.

History

#1 Updated by Go MAEDA 8 months ago

Alexander Meindl wrote:

Plugin developers very often overwrite queries helper column_value and column_content.

Could you show me some plugins that do that?

#2 Updated by Alexander Meindl 8 months ago

Hi Go MAEDA,

thanks for responding.

Here is a list of some plugins which overwrites query helper methods:

#3 Updated by Go MAEDA 7 months ago

  • Target version set to Candidate for next major release

#4 Updated by Chris Lockwood 5 months ago

Hi Go MAEDA

Can anything be done to bring forward the integration of this patch? This has the potential to solve a fairly sizable problem hampering plugin developers, and users of those plugins alike.

Quickly perusing what is listed in Candidate for next major release and it seems like many enhancements simply go there to die, numerous patches are 5+ years old. Please do reconsider whether this solution can be safely implemented within the next minor release.

#5 Updated by Go MAEDA 3 months ago

  • File 34743-v2.patchMagnifier added
  • Target version changed from Candidate for next major release to 5.0.0

Adjusted indentation to conform with the current coding style of Redmine.

Setting the target version to 5.0.0.

#6 Updated by Go MAEDA 3 months ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Committed the patch. Thank you.

Also available in: Atom PDF