Bug 32449

Summary: Plugins: Order the results of GetPlugins/get_enabled_plugins
Product: Koha Reporter: Marcel de Rooy <m.de.rooy>
Component: Plugin architectureAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: martin.renvoize, raphael.straub
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36503
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Marcel de Rooy 2022-12-12 12:05:52 UTC
We still get results back in database insertion order. We could at least order them by plugin class to get more consistent results for running multiple plugins, not relying on installation order.
A developer that needs execution in a certain order would be able to control that by class name. Which sounds more reliable to me than installation order.
Comment 1 Martin Renvoize (ashimema) 2024-05-03 10:07:45 UTC
In bug 36503 they introduced a priority attribute and sorted by that.

I'm not sure what the best approach is here honestly.. I think if we do allow for a priority then we'll want to expose that order somehow to end users and let them choose (probably with guidance from plugin authors in their documentation.. i.e why should one plugin be able to say it's more important than another.. surely that's the libraries decision)