CA Service Management

  • 1.  Need to capture the time stamp of the incident status change from 'open' to any other status

    Posted Oct 14, 2017 04:13 AM

    Need to capture the time stamp of the incident status change from 'open' to any other status in to a column in detail_in so that this time can be considered as the responding time of that particular ticket. 

     

    Regards,

    Vysakh



  • 2.  Re: Need to capture the time stamp of the incident status change from 'open' to any other status
    Best Answer

    Posted Oct 14, 2017 06:17 PM

    Hi Vysakh_N,

     

    Here's an example of how to accomplish this..

     

    1. Add zInit_Status_Change to cr schema as a Date field
    2. Save and publish
    3. Create a .spl file with the following contents and place in nx_root/site/mods/magic
    cr::zSetInitStatusChange(...)
    {
         string method;
         int activityDate;
         method ="cr::zSetInitStatusChange";
         logf(MILESTONE, "%s started", method);

         activityDate = (int)((date)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, "zInit_Status_Change", activityDate);
        
         logf(MILESTONE, "%s ended", method);
    }

       4. Create a .mod file with the following contents and place in nx_root/site/mods/magic

    MODIFY cr     POST_VALIDATE zSetInitStatusChange() 10011 FILTER(status { 'OP' -> } && EVENT("INSERT UPDATE"));

       5. Add read only date to detail_in form

    <PDM_MACRO name=dtlDateReadonly hdr="Initial Status Change" attr=zInit_Status_Change>

       6. Restart SDM services and test



  • 3.  Re: Need to capture the time stamp of the incident status change from 'open' to any other status

    Posted Oct 15, 2017 10:50 PM

    Grant's answer is great. And moves it conveniently to a field you can have on screen as requested.

     

    However, if you only need it for auditing purposes, this is written to the Activity Log anyway and saves you a SPL customisation.

     

     

    Kyle_R.



  • 4.  Re: Need to capture the time stamp of the incident status change from 'open' to any other status

    Posted Oct 16, 2017 09:06 AM

    Hi Vysakh_N  - did Gran't post help you out here?

    If so, can you please mark that one as the correct answer?

    Thanks!
    Jon I.



  • 5.  Re: Need to capture the time stamp of the incident status change from 'open' to any other status

    Posted Oct 16, 2017 03:25 PM

    Hi Grant,

     

    The solution worked perfectly. Thanks for all the efforts you put into helping others. Really appreciate it.

     

    Regards,

    Vysakh



  • 6.  Re: Need to capture the time stamp of the incident status change from 'open' to any other status

    Posted Oct 16, 2017 03:36 PM

    You're welcome!



  • 7.  Re: Need to capture the time stamp of the incident status change from 'open' to any other status

    Broadcom Employee
    Posted Oct 16, 2017 10:38 AM

    Vysakh, you could also use the out of box activity notification "Update Status" to implement this...you add an event to this "Update Status"  and in the event you set the condition to check of the type is incident and if the status_prev is Open

    and the action to set the custom field to the value now()(you would need to use pdm_load for this purpose as ACT type of macro can't be created from the web interface). This is pretty much the same implementation as suggested by Grant

    but using some out of box features. I don't test this yet and just throw here for your consideration. Thanks _Chi



  • 8.  Re: Need to capture the time stamp of the incident status change from 'open' to any other status

    Posted Oct 16, 2017 03:26 PM

    Hi Chi Chen,

     

    I will surely check this out. Thanks for the suggestion.

     

    Vysakh