The CreatorCon Call for Content is officially open! Get started here.

Closing the ticket

snehalkhare
Kilo Guru

Hi

a. Only requester should have the privilege to "Close" the ticket that has been put to resolved status.

b Ticket should automatically move to a closed state at the end of 7 calendar days from the Last Resolved Date.

c.. Support team should not have the right to manually put a ticket in "Closed" state.

d. A ticket can only be put in a closed state from a Resolved State or Cancelled state.

Can anyone suggest what can be done?

Thanks

Snehal Khare

16 REPLIES 16

Hi Snehal,



Check the before update business rules written in this table/task table.



There some condition is contradicting with the update functionality of the Re-open ui action you have written.



Thanks,


Mihir


hi


there's a br --incident reopen


its before update


Filter condition : Active is false


action: set field values: active to true



condition:current.incident_state != IncidentState.CLOSED && current.incident_state != IncidentState.CANCELED



My UI action is as follows:


condition: current.state==6&&gs.getUserID() == current.caller_id


Script:



function reopenIncident(){


    if (g_form.getValue('comments') == '') {


          // Remove any existing field message, set comments mandatory, and show a new field message


          try {


                g_form.hideFieldMsg('comments');


          } catch(e) {}


          g_form.setMandatory('comments', true);


          g_form.showFieldMsg('comments', getMessage('Please enter a comment when reopening an Incident'), 'error');


          return false;   // Abort submission


    }


    // Call the UI Action and skip the 'onclick' function


    gsftSubmit(null, g_form.getFormElement(), 're_open_inc'); // MUST call the 'Action name' set in this UI Action


}




// Code that runs without 'onclick'


// Ensure call to server side function with no browser errors


if (typeof window == 'undefined')


    serverReopen();




function serverReopen() {


    // Set Incident state to active, update and reload the record


    current.state = 2;


    current.update();


    gs.addInfoMessage(gs.getMessage("Incident reopened"));


  gsftSubmit(null, g_form.getFormElement(), 'sysverb_update_and_stay');


    action.setRedirectURL(current);


}


Can you plz help me I am not able to understand whats going wrong



thanks


Snehal Khare