Clarity Service Management

Expand all | Collapse all

Automatically update acknowledged date in CA service desk manager 14.1

Jump to Best Answer
  • 1.  Automatically update acknowledged date in CA service desk manager 14.1

    Posted 07-18-2016 07:50 AM


    Hi team,

     

    I have created a custom field for acknowledged date and added that field on CA service desk manager with the help of open form in web screen painter. When a ticket is acknowledged on CA service desk manager, the acknowledged date has to be manually updated. How can acknowledged date be updated on CA service desk manager automatically as the ticket is acknowledged in CA service desk manager 14.1. ?

     

    Kindly suggest a method/code to update acknowledged date automatically.

     

    Thanks and Regards

    Nabeel Asif



  • 2.  Re: Automatically update acknowledged date in CA service desk manager 14.1

    Posted 07-18-2016 08:41 AM

    Hi Nabeel,

     

    Why don't use the following approach...Set the ticket to 'Acknowledged' status and then use the date-time stamp the ticket was set to this status to check when the ticket was acknowledged? You will then see this on the Activity Log of the ticket.

     

    Regards,

    Brian



  • 3.  Re: Automatically update acknowledged date in CA service desk manager 14.1

    Posted 07-19-2016 01:46 AM

    Hi Brian,

    How can custom field for acknowledged date be updated with the activity log?

     

    Regards,

    Nabeel



  • 4.  Re: Automatically update acknowledged date in CA service desk manager 14.1

    Posted 07-19-2016 08:13 AM

    Hi Nabeel,

     

    As per David, a custom spel trigger would need to be written.The question to you however is what would constitute an acknowledgment of a ticket in your environment?

     

    Kind Regards,

    Brian



  • 5.  Re: Automatically update acknowledged date in CA service desk manager 14.1
    Best Answer

    Posted 07-18-2016 09:54 AM

    Hello,

    Can you describe what it is you are trying to do with this date field?  When a case is acknowledged, a custom date field is to be updated per the change in status to Acknowledge.  Is that specific to the Acknowledge status only?  Is this for reporting purposes?

     

    To directly answer your question, you would have to develop some kind of custom trigger so that when the status field is changed to Acknowledged, the date field you are looking to update is then changed automatically.  However, Support is not permitted to provide assistance in developing the necessary trigger code.

     

    Brian's point about using the Activity Log date field would be a more advisable approach if you need to report on when a case was set to Acknowledged.



  • 6.  Re: Automatically update acknowledged date in CA service desk manager 14.1

    Posted 07-19-2016 01:42 AM

    Hello David,

     

    Yes, this is for reporting purpose. I want to generate a report to determine time difference between open date and acknowledged date for the tickets. How can i use activity log date field to automatically update acknowledged date?

     

     

    Thanks and Regards

    Nabeel



  • 7.  Re: Automatically update acknowledged date in CA service desk manager 14.1

    Posted 07-19-2016 01:52 PM

    Hi Nabeel1,

     

    I had a similar requirement that I found easier to fulfill using a custom date field on Call_Req.  I can share the spel and trigger I use to update the field.  What is the name of your acknowledge date field?



  • 8.  Re: Automatically update acknowledged date in CA service desk manager 14.1

    Posted 07-22-2016 05:36 AM

    Hi Grant,

    The name of acknowledge date field is zAcknowledge_Date

     

    Regards

    Nabeel



  • 9.  Re: Automatically update acknowledged date in CA service desk manager 14.1

    Posted 07-25-2016 03:12 PM

    Hi Nabeel1 - Did any of the responses help answer your question? If so please mark as Correct Answer. Thanks!



  • 10.  Re: Automatically update acknowledged date in CA service desk manager 14.1

    Posted 07-22-2016 09:38 AM

    You can add a spel function which will trigger on acknowledgement. In that spel function write code to insert "now()" function value on the zAcknowledge_Date field. Considering you have the correct datatype set for zAcknowledge_Date field

     

    Thanks

    ArunavaS



  • 11.  Re: Automatically update acknowledged date in CA service desk manager 14.1

    Posted 07-22-2016 10:07 AM

    Here is the spel and mod file I put together to automatically update the acknowledge date.  I wouldn't mind to have it critiqued, @ArunavaS.  Let me know if there is a better way to do this.

     

     

    Spel file

    cr::zSetAckDate(...)
    {
    string Method;
    Method ="zSetAckDate";
    duration zAck;
    zAck=now();
    uuid who;
    send_wait(0,top_object(), "call_attr", "cnt", "current_user_id");
    who=msg[0];
    send_wait(0, top_object(), "call_attr", "api", "update_object_super", who, persistent_id, 0, "zAcknowledge_Date", zAck);
    }
    

    mod file

    ////////////////////////////////////////////////////////////////////////
    // Factory:  cr
    ////////////////////////////////////////////////////////////////////////
    OBJECT cr {
     TRIGGERS {
      POST_VALIDATE zSetAckDate() 10004 FILTER(status { -> 'ACK'} && EVENT("INSERT UPDATE"));
     };
    };
    

     

    Edit: Changed the zAck=last_mod_dt; line to zAck=now();



  • 12.  Re: Automatically update acknowledged date in CA service desk manager 14.1

    Posted 02-14-2018 11:55 AM

    Sorry if this is considered a 'necro' update, but if you are using the Audit Log options then the Status changes are captured along with their timestamps and no custom fields are required for reporting.

     

    Sample SQL for a simple report:

     

    SELECT
        CR.ref_num "Ticket",
        AUD.attr_before_val "From status",
        AUD.attr_after_val "To status",
        DATEADD(ss, AUD.change_date, '1/1/1970') [Changed Timestamp]
    --AUD.*
    FROM
        audit_log AUD
        LEFT JOIN call_req CR
            ON AUD.audobj_persid = CR.persid
    WHERE
        AUD.audobj_name = 'cr'
        AND AUD.attr_name = 'status'
        AND AUD.attr_after_val = 'Acknowledged'

    Sample output:

    Ticket    From status    To status    Changed Timestamp
    204    Open    Acknowledged    2016-01-13 18:44:54.000
    210    Open    Acknowledged    2016-01-13 19:24:52.000
    230    Open    Acknowledged    2016-01-14 21:11:58.000
    234    Open    Acknowledged    2016-01-18 22:27:31.000
    238    Open    Acknowledged    2016-01-22 17:23:49.000
    269    Open    Acknowledged    2016-01-30 03:51:14.000
    270    Open    Acknowledged    2016-02-01 15:33:01.000
    270    Open    Acknowledged    2016-02-10 21:27:43.000
    230    Open    Acknowledged    2016-02-10 21:27:53.000
    280    Open    Acknowledged    2016-02-11 20:13:15.000

     

    Note that this is easily expandable to account for multiple changes of any status to any other status (re-opens and then acknowledged again, etc).  Check out the rest of the fields available in the audit_log table.

     

    Regards,

     

    J.W.