if ($t_show_fixed_in_version) {
        echo '<th class="print-category">', lang_get('fixed_in_version'), '</th>';
        echo '<td class="print">', $t_fixed_in_version, '</td>';
    } else {
        $t_spacer += 2;
    }
    echo '<td class="print" colspan="', $t_spacer, '">&#160;</td>';
    echo '</tr>';
}
#
# Custom Fields
#
$t_related_custom_field_ids = custom_field_get_linked_ids($t_bug->project_id);
foreach ($t_related_custom_field_ids as $t_id) {
    # Don't display the field if user does not have read access to it
    if (!custom_field_has_read_access_by_project_id($t_id, $t_bug->project_id)) {
        continue;
    }
    $t_def = custom_field_get_definition($t_id);
    echo '<tr class="print">';
    echo '<th class="print-category">', string_display_line(lang_get_defaulted($t_def['name'])), '</th>';
    echo '<td class="print" colspan="4">';
    print_custom_field_value($t_def, $t_id, $f_bug_id);
    echo '</td>';
    echo '</tr>';
}
# foreach
echo '<tr><td class="print-spacer" colspan="6"><hr /></td></tr>';
if ($t_show_summary) {
    echo '<tr class="print">';
    echo '<th class="print-category">', lang_get('summary'), '</th>';
Example #2
0
/**
 * Get all accessible columns for the current project / current user..
 * @param int $p_project_id project id
 * @return array array of columns
 * @access public
 */
function columns_get_all($p_project_id = null)
{
    $t_columns = columns_get_standard();
    # add plugin columns
    $t_columns = array_merge($t_columns, array_keys(columns_get_plugin_columns()));
    # Add project custom fields to the array.  Only add the ones for which the current user has at least read access.
    if ($p_project_id === null) {
        $t_project_id = helper_get_current_project();
    } else {
        $t_project_id = $p_project_id;
    }
    $t_related_custom_field_ids = custom_field_get_linked_ids($t_project_id);
    foreach ($t_related_custom_field_ids as $t_id) {
        if (!custom_field_has_read_access_by_project_id($t_id, $t_project_id)) {
            continue;
        }
        $t_def = custom_field_get_definition($t_id);
        $t_columns[] = 'custom_' . $t_def['name'];
    }
    return $t_columns;
}
Example #3
0
/**
 * Get all custom_field columns for the current project / current user..
 * @param int $p_project_id project id
 * @return array array of columns
 * @access public
 */
function columns_get_custom_fields($p_project_id = null)
{
    # Add project custom fields to the array.  Only add the ones for which the current user has at least read access.
    if ($p_project_id === null) {
        $t_project_id = helper_get_current_project();
    } else {
        $t_project_id = $p_project_id;
    }
    $t_related_custom_field_ids = custom_field_get_linked_ids($t_project_id);
    foreach ($t_related_custom_field_ids as $t_id) {
        if (!custom_field_has_read_access_by_project_id($t_id, $t_project_id)) {
            continue;
        }
        $t_def = custom_field_get_definition($t_id);
        $t_columns[] = 'custom_' . strtolower($t_def['name']);
    }
    return $t_columns;
}