View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0022210 | mantisbt | plug-ins | public | 2017-01-16 04:50 | 2017-05-12 18:03 |
Reporter | mboutell | Assigned To | dregad | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | unable to reproduce | ||
Summary | 0022210: Plugin "priority" is not working | ||||
Description | I added a plugin on my instance which use the event EVENT_VIEW_BUG_DETAILS to add some fields. Thank you. | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
I never actually had the need to use plugin priority, but I'll try to have a look. It would be nice if you could specify/provide the plugins you are using, to facilitate problem reproduction. |
|
The plugins are the ones I developped. My plugin A adds a field in the issue thanks to "EVENT_VIEW_BUG_DETAILS"
And it's not the case. So, if priority can't help me, when this value is used ? Is there a way to order my plugin fields ??? EDIT (dregad): changed 'had' to 'add' per mboutell's request |
|
I think it was clear from the start, but thanks for updating anyway. The reason for my request, is that if indeed the priority should impact the order in which fields are displayed, then it would be helpful and better to have existing, real-life code to test that the feature works as expected, rather than having waste time to write dummy test plugins for that. |
|
As far as I know, priorities determine the order in which plugins are registered, and therefore (in theory) the order in which the callback are executed. In addition, for events of type "first", callbacks processing will stop after the first non-null value is returned. |
|
I have tested with my installed plugins, wich also uses EVENT_VIEW_BUG_DETAILS As far as i know, this hasn't been changed from mantis 1.2.x to 1.3. |
|
I'm sorry but I used 5 for my plugin B and 1 for my plugin A and my plugin B is still called before (At least the fields from plugin A are displayed before the ones of plugin B) |
|
Thats exactly the behaviour i described: plugin B with priority=5 executes before plugin A with priority=1
That's contradictory, you said "plugin B was called before A" |
|
Exactly my answer was contradictory : the plugin A is called before my plugin B (sorry for my last answer) |
|
Any other suggestion ? Still can't use priority... |
|
Is there something to activate ? I can't find where the priority is used in the code. |
|
I still can't choose the priority of my plugins. |
|
Hello, I took the time today to create a couple dummy plugins to test this. They simply display the plugin's name and assigned priority when EVENT_VIEW_BUG_DETAILS is sent. Here is the source code (the only difference between the 2 plugins being their name)
After installing the 2 plugins, I tested as follows, by setting:
As shown in the attached screenshot, the system works as expected, i.e. the plugin with the higher priority displays first |
|