Пример #1
0
/**
 * Print column content for column bugnotes count
 *
 * @param BugData $p_bug bug object
 * @param int $p_columns_target see COLUMNS_TARGET_* in constant_inc.php
 * @return null
 * @access public
 */
function print_column_bugnotes_count($p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE)
{
    global $t_filter;
    # grab the bugnote count
    $t_bugnote_stats = bug_get_bugnote_stats($p_bug->id);
    if (NULL !== $t_bugnote_stats) {
        $bugnote_count = $t_bugnote_stats['count'];
        $v_bugnote_updated = $t_bugnote_stats['last_modified'];
    } else {
        $bugnote_count = 0;
    }
    echo '<td class="column-bugnotes-count">';
    if ($bugnote_count > 0) {
        $t_show_in_bold = $v_bugnote_updated > strtotime('-' . $t_filter[FILTER_PROPERTY_HIGHLIGHT_CHANGED] . ' hours');
        if ($t_show_in_bold) {
            echo '<span class="bold">';
        }
        print_link(string_get_bug_view_url($p_bug->id) . "&nbn={$bugnote_count}#bugnotes", $bugnote_count);
        if ($t_show_in_bold) {
            echo '</span>';
        }
    } else {
        echo '&#160;';
    }
    echo '</td>';
}
Пример #2
0
/**
 * return the bug note count for an issue
 * @param BugData $p_bug A BugData object.
 * @return string
 * @access public
 */
function csv_format_bugnotes_count(BugData $p_bug)
{
    # grab the bugnote count
    $t_bugnote_stats = bug_get_bugnote_stats($p_bug->id);
    if ($t_bugnote_stats) {
        $t_bugnote_count = $t_bugnote_stats['count'];
    } else {
        $t_bugnote_count = 0;
    }
    return csv_escape_string($t_bugnote_count);
}
Пример #3
0
function print_column_bugnotes_count($p_row, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE)
{
    global $t_filter;
    # grab the bugnote count
    $t_bugnote_stats = bug_get_bugnote_stats($p_row['id']);
    if (NULL !== $t_bugnote_stats) {
        $bugnote_count = $t_bugnote_stats['count'];
        $v_bugnote_updated = $t_bugnote_stats['last_modified'];
    } else {
        $bugnote_count = 0;
    }
    echo '<td class="center">';
    if ($bugnote_count > 0) {
        $t_bugnote_link = '<a href="' . string_get_bug_view_url($p_row['id']) . '&amp;nbn=' . $bugnote_count . '#bugnotes">' . $bugnote_count . '</a>';
        if ($v_bugnote_updated > strtotime('-' . $t_filter['highlight_changed'] . ' hours')) {
            printf('<span class="bold">%s</span>', $t_bugnote_link);
        } else {
            echo $t_bugnote_link;
        }
    } else {
        echo '&nbsp;';
    }
    echo '</td>';
}
Пример #4
0
/**
 * Gets the bug note count for an issue
 * @param BugData $p_bug A bug object.
 * @return string
 * @access public
 */
function excel_format_bugnotes_count(BugData $p_bug)
{
    # grab the bugnote count
    $t_bugnote_stats = bug_get_bugnote_stats($p_bug->id);
    if (null !== $t_bugnote_stats) {
        $t_bugnote_count = $t_bugnote_stats['count'];
    } else {
        $t_bugnote_count = 0;
    }
    return excel_prepare_number($t_bugnote_count);
}