View Issue Details

IDProjectCategoryView StatusLast Update
0013236mantisbtplug-inspublic2014-12-08 00:33
Reporterray81Assigned Todregad 
PrioritynormalSeverityfeatureReproducibilityalways
Status closedResolutionfixed 
Product Version1.2.6 
Target Version1.3.0-beta.1Fixed in Version1.3.0-beta.1 
Summary0013236: add event to print attachment
Description

I'm currently developing an attachment plugin, so that attachments can have an added view (like a player for music files).
I need an event to add things after the line of an attachment.

For example (player on next line):
[] test.mp3 [^] (121,589 bytes) 12-08-11, 12:02 [Delete]
[PLAYER]

or (added link on the same line):
[] test.pdf [^] (131,563 bytes) 12-08-11, 12:02 [Delete] [View Content] [ADDED_LINK]

Could a PRINT_ATTACHMENT event be added?

Additional Information

I added the event_signal at the end of the else of if ( !$t_attachment['exists'] ) of the function print_bug_attachments_list in /core/print_api.php. Currently on line 1769

Wow that sounds difficult. Here's an example:
function print_bug_attachments_list( $p_bug_id ) {
...
foreach ( $t_attachments as $t_attachment ) {
...
if ( !$t_attachment['exists'] ) {
...
} else {
...
#SIGNAL ADDED HERE
event_signal('PRINT_ATTACHMENT', array($t_attachment));
}
...
}
...
}

TagsNo tags attached.

Relationships

related to 0015721 closedgrangeway Functionality to consider porting to master-2.0.x 

Activities

rombert

rombert

2011-08-18 10:32

developer   ~0029511

Thank you for the report and suggested fix. Would you consider submitting pull requests for this functionality? This would greatly increase the speed of including these changes in MantisBT.

Ideally you would submit pull requests for both the master and master-1.2.x branches at https://github.com/mantisbt/mantisbt .

ray81

ray81

2011-09-16 05:26

reporter   ~0029745

I haven't done anything in GIT yet, but if i will, i'll add a patch.

grangeway

grangeway

2013-04-05 17:57

reporter   ~0036236

Marking as 'acknowledged' not resolved/closed to track that change gets ported to master-2.0.x branch

Related Changesets

MantisBT: master 3eb0430b

2012-09-21 07:27:02

dregad

Details Diff
Fix 0013236: Added event 'EVENT_VIEW_BUG_ATTACHMENT'

Allows printing HTML code after each attachment.

Moved the event definition with other bug-related events.
mod - core/events_inc.php Diff File
mod - core/print_api.php Diff File
mod - docbook/Developers_Guide/en-US/Events_Reference_Output.xml Diff File

Issue History

Date Modified Username Field Change
2011-08-15 08:54 ray81 New Issue
2011-08-18 10:28 rombert Status new => confirmed
2011-08-18 10:32 rombert Note Added: 0029511
2011-09-10 20:00 rombert Priority urgent => normal
2011-09-10 20:00 rombert Severity major => feature
2011-09-16 05:26 ray81 Note Added: 0029745
2012-09-21 10:49 dregad Changeset attached => MantisBT master 3eb0430b
2012-09-21 10:49 dregad Assigned To => dregad
2012-09-21 10:49 dregad Status confirmed => resolved
2012-09-21 10:49 dregad Resolution open => fixed
2012-09-21 10:49 dregad Fixed in Version => 1.3.0-beta.1
2012-09-21 10:50 dregad Target Version => 1.3.0-beta.1
2013-04-05 17:57 grangeway Status resolved => acknowledged
2013-04-05 17:57 grangeway Note Added: 0036236
2013-04-05 18:47 grangeway Relationship added related to 0015721
2013-04-06 03:44 dregad Status acknowledged => resolved
2013-04-06 07:20 grangeway Status resolved => acknowledged
2013-04-06 09:26 dregad Tag Attached: 2.0.x check
2013-04-06 09:26 dregad Status acknowledged => resolved
2014-09-23 18:05 grangeway Tag Detached: 2.0.x check
2014-12-08 00:33 vboctor Status resolved => closed