Integration with Sharepoint or other CMS system

Post about your customizations to share with others.

Moderators: Developer, Contributor

Post Reply
HMB
Posts: 5
Joined: Oct 04, 2020 2:42 am

Integration with Sharepoint or other CMS system

Post by HMB »

I needed to integrate mantis in our department with MS SharePoint in order to manage all documentations related to bugs inside the SharePoint library.
The solution was :
- use a customized field(type string): for a bug in mantis, this field register the absolute path of the related folder in SharePoint librairy containing all documents.
- change the source code of bug_view_inc.php to display the path as a href link to SharePoint in the bug view page, as below
Line 475
# Custom Fields
if( isset( $t_issue['custom_fields'] ) ) {
foreach( $t_issue['custom_fields'] as $t_custom_field ) {
$t_def = custom_field_get_definition( $t_custom_field['field']['id'] );

echo '<tr>';
echo '<th class="bug-custom-field category">', string_display_line( lang_get_defaulted( $t_def['name'] ) ), '</th>';
echo '<td class="bug-custom-field" colspan="5">';
#HMB customized Fileds spec
if('Sharepoint Path'==$t_def['name']){
echo '<a href="' .custom_field_get_value( $t_custom_field['field']['id'], $f_issue_id ). '" target= "_blank"/>',print_custom_field_value( $t_def, $t_custom_field['field']['id'], $f_issue_id ),'</a>';



}else{
print_custom_field_value( $t_def, $t_custom_field['field']['id'], $f_issue_id );
}

echo '</td></tr>';
}

# spacer
echo '<tr class="spacer"><td colspan="6"></td></tr>';
echo '<tr class="hidden"></tr>';
}
Post Reply