View Issue Details

IDProjectCategoryView StatusLast Update
0012472mantisbtrelationshipspublic2012-07-28 05:58
Reporterjmonin Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
Status newResolutionopen 
Product Version1.2.3 
Summary0012472: Add custom fields to the relationships section of the bug view page
Description

It would be more than useful to be able to add custom fields the the relationships section of the bug view page.
As an example, some mantis deployments use a "customer id" for each bugs, which is often referred to. Being able to see it there would be perfect.

TagsNo tags attached.
Attached Files
mantis-1.2.3-patch-CONCEPT-relationship-custom-field.patch (864 bytes)   
--- mantisbt-1.2.3-orig/core/relationship_api.php	2010-09-14 20:40:10.000000000 +0200
+++ mantisbt-1.2.3/core/relationship_api.php	2010-10-21 17:20:09.000000000 +0200
@@ -631,6 +631,8 @@
 	$t_relationship_info_html = $t_td . string_no_break( $t_relationship_descr ) . '&nbsp;</td>';
 	if( $p_html_preview == false ) {
 		$t_relationship_info_html .= '<td><a href="' . string_get_bug_view_url( $t_related_bug_id ) . '">' . bug_format_id( $t_related_bug_id ) . '</a></td>';
+		# Add the customer_id
+		$t_relationship_info_html .= '<td>' . custom_field_get_value( custom_field_get_id_from_name( 'id_customer' ), $t_related_bug_id ) . '</td>';
 		$t_relationship_info_html .= '<td><span class="issue-status" title="' . $t_resolution . '">' . $t_status . '</span></td>';
 	} else {
 		$t_relationship_info_html .= $t_td . bug_format_id( $t_related_bug_id ) . '</td>';

Relationships

related to 0014522 new I want to be able to configure the view in the Relationships window 

Activities

jmonin

jmonin

2010-10-22 05:56

reporter   ~0027120

I didn't have time to implement a general solution, but you'll find attached a specific patch we applied for our particular needs (add the custom field named "id_customer").

philippd

philippd

2011-01-16 19:10

reporter   ~0027958

Last edited: 2011-01-16 19:14

Thank you for the patch which works fine. I would really appreciate this feature being implemented in mantis core.

Maybe the issue is related to 0007332 as there might be the need for column-headlines which could be used for selecting a sort key.