Making WordPress.org

Changeset 906


Ignore:
Timestamp:
10/11/2014 08:24:43 PM (10 years ago)
Author:
nacin
Message:

Trac Components: Bring focuses into the 'no replies' query. fixes #654.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/trac-notifications/trac-components.php

    r905 r906  
    432432
    433433    function trac_content( $component ) {
    434         if ( $unreplied_tickets = $this->trac->get_results( $this->trac->prepare( "SELECT id, summary, status, resolution, milestone FROM ticket t WHERE id NOT IN (SELECT ticket FROM ticket_change WHERE ticket = t.id AND t.reporter <> author AND field = 'comment' AND newvalue <> '') AND status <> 'closed' AND component = %s", $component ) ) ) {
     434        $unreplied_tickets = $this->trac->get_results( $this->trac->prepare(
     435            "SELECT id, summary, status, resolution, milestone, value as focuses
     436            FROM ticket t LEFT JOIN ticket_custom c ON c.ticket = t.id AND c.name = 'focuses'
     437            WHERE id NOT IN (
     438                SELECT ticket FROM ticket_change
     439                WHERE ticket = t.id AND t.reporter <> author
     440                AND field = 'comment' AND newvalue <> ''
     441            ) AND status <> 'closed' AND component = %s", $component ) );
     442
     443        if ( $unreplied_tickets ) {
    435444            $count = count( $unreplied_tickets );
    436445            echo '<h3>' . sprintf( _n( '%d ticket that has no replies', '%d tickets that have no replies', $count ), $count ) . '</h3>';
Note: See TracChangeset for help on using the changeset viewer.