View Issue Details

IDProjectCategoryView StatusLast Update
0020183mantisbtdocumentationpublic2016-08-15 09:02
Reportercproensa Assigned Todregad  
PrioritynormalSeveritytextReproducibilityhave not tried
Status closedResolutionfixed 
Product Version1.2.0rc2 
Target Version1.2.20Fixed in Version1.2.20 
Summary0020183: EVENT_MENU_ISSUE should pass bug_id as parameter
Description

EVENT_MENU_ISSUE adds links in the issue view page, next to:
[ Jump to Notes ] [ Send a reminder ] ...

Existing links already are built with bug id as a GET parameter. If i want to put a link by hooking on this event, is there an "easy" way of knowing the bug_id where it was triggered from?

seems like "gpc_get('id')" works, but does not look a like a solid solution

TagsNo tags attached.

Activities

atrol

atrol

2015-10-09 01:55

developer   ~0051616

The ID is already passed in bug_view_inc.php $t_links = event_signal( 'EVENT_MENU_ISSUE', $f_bug_id );

Example how to use it:
https://github.com/mantisbt-plugins/source-integration/blob/master/Source/SourceIntegration.php#L23

cproensa

cproensa

2015-10-09 03:22

developer   ~0051617

Thanks Atrol.
Actually, i was trusting the documentation, which does not say anything about this parameter

dregad

dregad

2015-10-12 03:15

developer   ~0051622

Reopening so that we keep track of the required documentation update to make it reflect what the code actually does.

cproensa

cproensa

2015-10-22 19:11

developer   ~0051682

revised documentation for plugin events:
https://github.com/mantisbt/mantisbt/pull/662

dregad

dregad

2015-10-24 20:15

developer   ~0051705

The PR has been merged in master, and the documentation updates backported to 1.2.x branch. Thanks for your contribution !

Related Changesets

MantisBT: master-1.2.x 35a89d88

2015-10-24 15:38

dregad


Details Diff
Documentation and code clean up for plugin events

After my question in issue 0020183, here is some clean up for the events
documentation:

- Added doc for missing parameters:
- EVENT_LOG
- EVENT_DISPLAY_FORMATTED
- EVENT_MENU_ISSUE
- EVENT_VIEW_BUG_ATTACHMENT
- EVENT_MANAGE_OVERVIEW_INFO
- Missing documentation for event EVENT_DISPLAY_EMAIL_BUILD_SUBJECT
- Code clean up on usage of events:
- EVENT_UPDATE_BUG_FORM
- EVENT_UPDATE_BUG_FORM_TOP
- Change comments to reflect actual types for function event_type_chain()
- Apply consistent formating to documentation

Backported from master 9fcdd066f78ad22f2b644a3fe7d08b4bea77187d
Affected Issues
0020183
mod - bug_update_advanced_page.php Diff File
mod - core/event_api.php Diff File
mod - docbook/developers/en/event-reference-manage.sgml Diff File
mod - docbook/developers/en/event-reference-output.sgml Diff File
mod - docbook/developers/en/event-reference.sgml Diff File

MantisBT: master 9fcdd066

2015-10-24 15:38

dregad


Details Diff
Documentation and code clean up for plugin events

After my question in issue 0020183, here is some clean up for the events
documentation:

- Added doc for missing parameters:
- EVENT_LOG
- EVENT_DISPLAY_FORMATTED
- EVENT_MENU_ISSUE
- EVENT_VIEW_BUG_ATTACHMENT
- EVENT_MANAGE_OVERVIEW_INFO
- Missing documentation for event EVENT_DISPLAY_EMAIL_BUILD_SUBJECT
- Code clean up on usage of events:
- EVENT_UPDATE_BUG_FORM
- EVENT_UPDATE_BUG_FORM_TOP
- Change comments to reflect actual types for function event_type_chain()
- Apply consistent formating to documentation
Affected Issues
0020183
mod - bug_update_page.php Diff File
mod - core/event_api.php Diff File
mod - docbook/Developers_Guide/en-US/Events_Reference.xml Diff File
mod - docbook/Developers_Guide/en-US/Events_Reference_Manage.xml Diff File
mod - docbook/Developers_Guide/en-US/Events_Reference_Output.xml Diff File