View Issue Details

IDProjectCategoryView StatusLast Update
0011365mantisbtplug-inspublic2020-03-15 15:23
ReporterMarkusSchulte Assigned Todregad  
PrioritynormalSeverityfeatureReproducibilityN/A
Status closedResolutionfixed 
Product Version1.2.0rc2 
Target Version2.24.0Fixed in Version2.24.0 
Summary0011365: New Event: EVENT_MENU_ISSUE_RELATIONSHIP
Description

Hi,

for time being i am developing a Mantis-Plugin, which is primarily concerned with bug relation.

So i have downloaded Mantis 1.2.0 rc2 and added a new Event
EVENT_MENU_ISSUE_RELATIONSHIP

Necessary Code is attached.

Well, this is almost C+P from "function print_summary_menu" (core/html_api.php). Unfortunately i have not found a better way to integrate this new event.

Though, i think this additional event is useful, so i would be happy, if someone here could integrate it.

Additional Information

core/relationship_api.php, behind line 820 (right behind the code block "if( ON == config_get( 'relationship_graph_enable' ) ) {[...]}"

// Plugins menu items
$t_event_menu_options = event_signal( 'EVENT_MENU_ISSUE_RELATIONSHIP' );
$t_menu_options = array();
foreach( $t_event_menu_options as $t_plugin => $t_plugin_menu_options ) {
    foreach( $t_plugin_menu_options as $t_callback => $t_callback_menu_options ) {
        if( is_array( $t_callback_menu_options ) ) {
            $t_menu_options = array_merge( $t_menu_options, $t_callback_menu_options );
        } else {
            $t_menu_options[] = $t_callback_menu_options;
        }
    }
}
foreach( $t_menu_options as $t_menu_name => $t_menu_item ) {
    echo '<span class="small">';
    print_bracket_link($t_menu_item, $t_menu_name );
    echo '</span>';
}
Tagspatch
Attached Files
bug_view.png (100,324 bytes)   
bug_view.png (100,324 bytes)   
diagram.png (6,948 bytes)   
diagram.png (6,948 bytes)   
Mantis Diff.txt (856 bytes)   
core/events_inc.php, added
   'EVENT_MENU_ISSUE_RELATIONSHIP' => EVENT_TYPE_DEFAULT,

core/relationship_api.php, added line 821.ff
	// Plugins menu items
	$t_event_menu_options = event_signal( 'EVENT_MENU_ISSUE_RELATIONSHIP' );
	$t_menu_options = array();
	foreach( $t_event_menu_options as $t_plugin => $t_plugin_menu_options ) {
		foreach( $t_plugin_menu_options as $t_callback => $t_callback_menu_options ) {
			if( is_array( $t_callback_menu_options ) ) {
				$t_menu_options = array_merge( $t_menu_options, $t_callback_menu_options );
			} else {
				$t_menu_options[] = $t_callback_menu_options;
			}
		}
	}
	foreach( $t_menu_options as $t_menu_name => $t_menu_item ) {
		echo '<span class="small">';
		print_bracket_link($t_menu_item, $t_menu_name );
		echo '</span>';
	}
right after 	if( ON == config_get( 'relationship_graph_enable' ) ) { [...] }
Mantis Diff.txt (856 bytes)   
GANTT.tar.gz (24,213 bytes)

Activities

MarkusSchulte

MarkusSchulte

2010-01-08 10:18

reporter   ~0024105

Just forgot to mention core/events_inc.php:

'EVENT_MENU_ISSUE' => EVENT_TYPE_DEFAULT,

has local become

'EVENT_MENU_ISSUE' => EVENT_TYPE_DEFAULT,
'EVENT_MENU_ISSUE_RELATIONSHIP' => EVENT_TYPE_DEFAULT,
dhx

dhx

2010-01-10 21:13

reporter   ~0024117

I'm trying to work out what the purpose of this new event would be. Are you effectively trying to add custom relationship types via a plugin hook (as opposed to adding relationship types via custom_relationships_inc.php)?

MarkusSchulte

MarkusSchulte

2010-01-11 02:20

reporter   ~0024122

Hi,

i want to visualize relationships between Issues, similar to the Relation/Dependency Graph.

To make myself clear, i have added Screenshots of current Development-State:

  • bug_view.png <-- modified bug view, with the new Event in action
  • diagram.png <-- actual plugin, which visualize the relationships auf a diagram. Not yet integrated, far from final.
dhx

dhx

2010-01-11 04:29

reporter   ~0024125

I think I understand now. So you need the event to add the [ GANTT ] link? Does it serve any other purpose?

The reason I am asking about the need for this event is that we'll need to document it :)

Regards,

David

MarkusSchulte

MarkusSchulte

2010-01-11 04:43

reporter   ~0024126

Yes, i need the event to add the link.

am-gtz

am-gtz

2010-01-13 07:15

reporter   ~0024135

Is that plugin available in some git repository? Looks cool!

MarkusSchulte

MarkusSchulte

2010-01-13 08:26

reporter   ~0024136

@am-gtz: Thank you!

This Plugin is far from stable/final, unfortunately I dont have enough time to complete it. Well, I will publish the plugin on mantisforge when I'm done.

am-gtz

am-gtz

2010-01-13 08:53

reporter   ~0024138

You can also publish the current version ... maybe somebody finds it cool enough to help you.

cspmcs

cspmcs

2010-05-05 14:52

reporter   ~0025412

I would like to add "Gantt Chart" feature on Mantis 1.1.8, which is considered very useful tool in my research team.
I will be very appreciated if someone can give me hints about how to start.
Thank you~

MarkusSchulte

MarkusSchulte

2010-05-28 06:20

reporter   ~0025620

Hi,

i am sorry for my later response; i just do not find the time to develop this plugin anymore.

Well, here is my source-code, maybe someone will develop it in the future.

In "Mantis Diff.txt" you find the necessary changes to Mantis (added Plugin-Point EVENT_MENU_ISSUE_RELATIONSHIP)

In GANTT.tar.gz is the source of the plugin, Screenshot are shown above.

12ways

12ways

2011-01-03 04:56

reporter   ~0027776

Hi,

It looks so nice.
It would be great, If it can show gantt chart by project although there is no relation-ship.

dregad

dregad

2019-09-21 17:57

developer   ~0062873

There is another Gantt Chart plugin: https://github.com/mantisbt-plugins/GanttChart. I'm not sure how much overlap there is between that and the one MarkusSchulte uploaded here many years ago, but I just thought I'd mention it in case someone is interested,

dregad

dregad

2019-09-21 20:17

developer   ~0062876

PR https://github.com/mantisbt/mantisbt/pull/1567

Related Changesets

MantisBT: master 89b126e1

2019-09-21 13:44

dregad


Details Diff
New EVENT_MENU_ISSUE_RELATIONSHIP event

Allows plugins to add new links to the menu under the Relationships
section in the View Issue Details page.

Fixes 0011365
Affected Issues
0011365
mod - bug_view_inc.php Diff File
mod - core/events_inc.php Diff File
mod - docbook/Developers_Guide/en-US/Events_Reference_Output.xml Diff File