How to select questions by status

Hi,

I am intensively using the support system plugin on my WP network (with now thousands of registered questions) and I recently made some change in the categories settings so that the 'last update time' of lots of questions has been reset to 'now'.

The 'new' and 'waiting for reply' questions are then completely lost among the thousands of other questions.

So I want to find back the questions with status 'new' or 'waiting for reply' but I don't see any way to do this.

Any help would be appreciated.

Thanks

  • Predrag Dubajic

    Hey @Boyington,

    Hope you're doing well today

    Could you please give me some more info about this part:
    I recently made some change in the categories settings so that the 'last update time' of lots of questions has been reset to 'now'.

    What changes did you made to get your ticket status changed?

    So I want to find back the questions with status 'new' or 'waiting for reply' but I don't see any way to do this.

    There is currently no way to select all new or waiting for reply tickets, you can filter them by opened tickets or sort them by status, as shown in screenshot below. Will that work for you?

    Best regards,
    Predrag

  • Boyington

    Hi Predrag,

    Thank you for this quick reply.

    1) I deleted some existing categories (so every questions attached to them switched to the default category)

    2) Yes it works as you say. If I order by status 'ASC', I first see the 'new' tickets, so it solves one of my two issues.
    But the 'waiting for reply' are still lost after the thousands of 'waiting for user reply' tickets (I would have to browse X pages to get the wanted 'waiting for reply' tickets).
    If I order by status 'DESC' , then the first displayed tickets are the 'closed' tickets.
    At last, if I select the 'opened' tickets, I have all the tickets that have never been closed by users, even after the admin reply, that pollute the result.

    Regards

  • Predrag Dubajic

    Hi Boyington,

    1) I deleted some existing categories (so every questions attached to them switched to the default category)

    Oh, ok, I thought that there was some misbehavior in the plugin but this is normal thing to happen

    I'm not sure how can we go about those filters now, so let me flag this thread for our second level support developers if they can find some workaround for this.
    Please note that, developer response might be slower than usual staff response, so we appreciate your patience on this.

    Best regards,
    Predrag

  • Hoang Ngo

    Hi @Boyington,

    I hope you are well today.

    I think we can try this method, Please add this code to your theme functions.php or use mu-plugins

    add_filter( 'support_system_get_tickets_where', 'support_system_get_tickets_where', 10, 2 );
    function support_system_get_tickets_where( $where, $count ) {
    	if ( isset( $_GET['page'] ) && $_GET['page'] == 'ticket-manager' && isset( $_GET['status'] ) ) {
    		if ( stristr( $where, 'WHERE t.ticket_status != 5' ) ) {
    			$where = str_replace( 'WHERE t.ticket_status != 5', 'WHERE t.ticket_status = ' . $_GET['status'], $where );
    		}
    	}
    
    	return $where;
    }

    And now, in the URL of the admin page, please append the &status=2, example
    http://domain.com/wp-admin/network/admin.php?page=ticket-manager&status=2
    This will help you filter the Waiting User Reply status, also, it will work with other status too.

    If you have any issues please don't hesitate to let us know so we can assist.

    Best regards,
    Hoang