Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom field description #758

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions admin/schema.php
Expand Up @@ -884,6 +884,9 @@

# Release marker: 1.3.0

# Add description field to custom field definition
$g_upgrade[210] = array( 'AddColumnSQL', array( db_get_table( 'custom_field' ), "
description XL $t_notnull DEFAULT \" '' \"" ) );

# ----------------------------------------------------------------------------
# End of schema definition, clear local variables
Expand Down
1 change: 1 addition & 0 deletions api/soap/mantisconnect.wsdl
Expand Up @@ -328,6 +328,7 @@
<xsd:element name="require_update" type="xsd:boolean" minOccurs="0"/>
<xsd:element name="require_resolved" type="xsd:boolean" minOccurs="0"/>
<xsd:element name="require_closed" type="xsd:boolean" minOccurs="0"/>
<xsd:element name="description" type="xsd:string" minOccurs="0"/>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="FilterCustomField">
Expand Down
1 change: 1 addition & 0 deletions api/soap/mc_project_api.php
Expand Up @@ -664,6 +664,7 @@ function mc_project_get_custom_fields( $p_username, $p_password, $p_project_id )
'require_update' => $t_def['require_update'],
'require_resolved' => $t_def['require_resolved'],
'require_closed' => $t_def['require_closed'],
'description' => $t_def['description'],
);
}
}
Expand Down
4 changes: 4 additions & 0 deletions bug_change_status_page.php
Expand Up @@ -292,6 +292,10 @@ class="datetime" size="20" maxlength="16"
<div class="field-container">
<label <?php echo $t_class_required ?> for="due_date">
<span><?php echo lang_get_defaulted( $t_def['name'] ) ?></span>
<?php if( !is_blank( $t_def['description'] ) ) {
echo '<br />';
echo '<span class="small">' . string_display_links( $t_def['description'] ) . '</span>';
} ?>
</label>
<span class="input">
<?php
Expand Down
10 changes: 7 additions & 3 deletions bug_report_page.php
Expand Up @@ -575,9 +575,13 @@
}
?>
<div class="field-container">
<label <?php echo $t_required_class, $t_label_for; ?>><span><?php
echo string_display( lang_get_defaulted( $t_def['name'] ) );
?></span></label>
<label <?php echo $t_required_class, $t_label_for; ?>>
<span><?php echo string_display( lang_get_defaulted( $t_def['name'] ) ) ?></span>
<?php if ( !is_blank( $t_def['description'] ) ) {
echo '<br />';
echo '<span class="small">' . string_display_links( $t_def['description'] ) . '</span>';
} ?>
</label>

<span class="input">
<?php print_custom_field_input( $t_def, ( $f_master_bug_id === 0 ) ? null : $f_master_bug_id ) ?>
Expand Down
4 changes: 4 additions & 0 deletions core/custom_field_api.php
Expand Up @@ -475,6 +475,10 @@ function custom_field_update( $p_field_id, array $p_def_array ) {
$t_update .= $t_field . '=' . db_param() . ', ';
$t_params[] = (bool)$t_value;
break;
case 'description':
$t_update .= $t_field . '=' . db_param() . ', ';
$t_params[] = empty($t_value) ? '' : (string)$t_value;
break;
}
}

Expand Down