Auto Close here? Really?

Discussion in 'Using your helpdesk' started by nibb, Mar 25, 2011.

  1. Gary McGrath

    Gary McGrath Kayako Staff Staff Member

    Johnson,

    Does your "solved" status actually mark the ticket as resolved? if so, auto close wont work, as it runs on "unresolved tickets" as I recall.

    Gary
  2. Johnson

    Johnson Member

    garyGBM.

    Yes it does. But that mean if I go to Admin CP -> Ticket -> Status -> Solved and change "Mark as Resolved?" from Yes to NO. It should work, right?

    /Johnson
  3. Gary McGrath

    Gary McGrath Kayako Staff Staff Member

    Yes it should ( but will not work on any tickets that have already had the status of sovled set before )

    Gary
  4. Johnson

    Johnson Member

    Many Thanks Gary.
    It's actually works with all ticket =)
  5. Gary McGrath

    Gary McGrath Kayako Staff Staff Member

    Excellent :D

    Gary
  6. larsoncorp

    larsoncorp New Member

    Has anyone been able to work around this issue and get Auto Close working without having to view all their "Answered" pending close tickets in their Inbox? Sure wish that "Views" would allow you to not show certain ticket Statuses. Would be even nicer if the Auto Close script would ignore "Mark as Resolved" and process the auto close normally on these Statuses.
  7. larsoncorp

    larsoncorp New Member

    The only thought I have but have not tested yet, is to change the preference to "No" for "Marked as Resolved" under the specified ticket status, run the autoclose cron, then set the status back to "Yes" for "Mark as Resolved". Testing it now, any other ideas anyone else has successfully implemented?
  8. cbuechler

    cbuechler New Member

    I changed the source on our site to ignore whether or not the ticket's status is a "resolved" status for AutoClose. We had the same need as others here, with "Answered" pending tickets not marked as opened, needing auto-close.

    Here's the source diff for that change.

    PHP:
     support/__apps/tickets/library/AutoClose/class.SWIFT_AutoCloseManager.php
    @@ -82,+82,@@
    continue;
    }
    // If this rule has invalid status or the target status isnt set to mark as resolved then we bail out
    - if (!isset($_ticketStatusCache[$_SWIFT_AutoCloseRuleObject->GetProperty('targetticketstatusid')])
    - || 
    $_ticketStatusCache[$_SWIFT_AutoCloseRuleObject->GetProperty('targetticketstatusid')]['markasresolved'] == '0') {
    // If this rule has invalid status then we bail out
    // don't bail on resolved tickets. custom change
    + if (!isset($_ticketStatusCache[$_SWIFT_AutoCloseRuleObject->GetProperty('targetticketstatusid')])) {
    continue;
    }
    @@ -
    180,10 +180,10 @@
    $_inactivityThreshold DATENOW - (floatval($_SWIFT_AutoCloseRuleObject->GetProperty('inactivitythreshold'))*60*60);
    // Once we have the the ticket list, we need to ensure that we get only tickets which are unresolved AND not pending auto close closure
    // Once we have the the ticket list, we need to ensure that we get only tickets which are not pending auto close closure
    $_finalTicketIDList = array();
    $_SWIFT->Database->Query("SELECT ticketid FROM " TABLE_PREFIX "tickets
    - WHERE ticketid IN (" 
    BuildIN($_ticketIDList) . ") AND isresolved = '0' AND autoclosestatus = '" SWIFT_Ticket::AUTOCLOSESTATUS_NONE "' AND lastactivity <= '" intval($_inactivityThreshold) . "'");
    WHERE ticketid IN (" . BuildIN($_ticketIDList) . ") AND autoclosestatus '" . SWIFT_Ticket::AUTOCLOSESTATUS_NONE . "' AND lastactivity <= '" . intval($_inactivityThreshold) . "'");
    while (
    $_SWIFT->Database->NextRecord()) {
    $_finalTicketIDList[] = $_SWIFT->Database->Record['ticketid'];
    }
    @@ -232,9 +232,8 @@
    continue;
    }
    - // If this rule has invalid status or the target status isnt set to mark as resolved then we bail out
    - if (!isset(
    $_ticketStatusCache[$_SWIFT_AutoCloseRuleObject->GetProperty('targetticketstatusid')])
    - || 
    $_ticketStatusCache[$_SWIFT_AutoCloseRuleObject->GetProperty('targetticketstatusid')]['markasresolved'] == '0') {
    + // If this rule has invalid status then we bail out
    + if (!isset(
    $_ticketStatusCache[$_SWIFT_AutoCloseRuleObject->GetProperty('targetticketstatusid')])) {
    continue;
    }
    It would be nice to have this as a configurable option, as obviously a number of folks need this functionality.

Share This Page