CA Service Management

Expand all | Collapse all

Additional Search Arguments - Internal Log Comments

Jump to Best Answer
  • 1.  Additional Search Arguments - Internal Log Comments

    Posted 06-27-2016 02:16 PM

    Hi,

     

    I've been using the additional search arguments to find queries by a particular analyst as referred to here: Additional Search Arguments properly formatted query. The challenge is however when I further use an additional parameter to find log comments act_log.type = 'LOG', it seems to only find public Log Comments. It does not seem to be able to find tickets where the Log Comments are marked as internal. Is there a way to get around this limitation?

     

    Regards,

    Michael



  • 2.  Re: Additional Search Arguments - Internal Log Comments

    Broadcom Employee
    Posted 06-27-2016 08:55 PM

    Hi Michael,

     

    I tested this and I see the same results as you.

     

    I can see that the query generated contains the where clause ( act_log.internal IS NULL OR act_log.internal != 1 ) so it won't return any internal log comments as they have a value of 1. This occurs even the role being used by the logged in user as the 'View Internal Logs?' parameter set to Yes.  

     

    I'm not sure if this is by design or a bug but it would certainly be worth opening a case with CA Support to get this clarified.

     

    Regards,

    Gordon



  • 3.  Re: Additional Search Arguments - Internal Log Comments

    Posted 06-27-2016 10:14 PM

    Hi Gordon,

     

    Thanks for your assistance. Yes, my account is able to view internal logs as this is the way I was able to discern a problem with the result set. Per your advice I have opened a CA Support ticket and I will report back with the findings for same.

     

    Regards,

    Michael



  • 4.  Re: Additional Search Arguments - Internal Log Comments

    Broadcom Employee
    Posted 06-28-2016 03:58 PM

    If the issue is reproducible OOTB with the latest CA SDM 14.1 release, we will have our SE team investigate.

    Please post the findings from the CA Support case to this post so that all community members can benefit.



  • 5.  Re: Additional Search Arguments - Internal Log Comments

    Posted 06-28-2016 07:50 PM

    Hey Paul,

     

    CA Support has been able to reproduce the issue per their comments in the ticket I opened. Copying below as requested:

     

    ========================

    TEST CASE

    ========================

    In a local environment with SD 14.1 Cum2

     

    Log in SD

     

    In the results panel selected all incidents

     

    Added in the additional search arguments the following statement:

     

    (type = 'I' AND act_log.analyst.userid = 'ServiceDesk')

     

    Enabled the debug mode for the sqlclass.c

     

    Then made the search

     

    Stopped the debug mode and check the log file

     

    The following statement took 0 milliseconds: Clause (SELECT DISTINCT call_req.open_date, call_req.id, min(attached_sla.time_to_violation) AS "mintime", min(usp_target_time.target_time) AS "mintgt", call_req.ref_num FROM (call_req LEFT JOIN attached_sla ON call_req.persid = attached_sla.mapped_cr LEFT JOIN usp_target_time ON call_req.persid = usp_target_time.mapped_cr), ca_contact, act_log WHERE ( call_req.active_flag = 0 AND ( call_req.assignee IS NOT NULL OR call_req.group_id IS NOT NULL ) AND ( call_req.type = ? AND ( act_log.internal IS NULL OR act_log.internal != 1 ) AND act_log.call_req_id = call_req.persid AND act_log.analyst = ca_contact.contact_uuid AND ca_contact.userid = ? ) ) AND ( call_req.type = ? ) GROUP BY call_req.open_date, call_req.id, call_req.ref_num ORDER BY call_req.open_date DESC) Input (<string>I|<string>ServiceDesk|<string>I)

     

    Notice the following where clause added:

     

    ( act_log.internal IS NULL OR act_log.internal != 1)

     

    This confirms the statement of the customer where they are not able to retrieve the log comments that are internal.



  • 6.  Re: Additional Search Arguments - Internal Log Comments
    Best Answer

    Broadcom Employee
    Posted 06-29-2016 04:16 AM

    Did you try act_log_all instead of act_log ?

     

    OBJECT cr {

    act_log         BREL alg call_req_id DYNAMIC { DOMSET alg_list ; } ;

    act_log_all     BREL alg call_req_id DYNAMIC { DOMSET alg_list_all ; } ;

    }

     

    OBJECT alg {

    DOMSET alg_list_all "time_stamp desc" DYNAMIC ;

         { WHERE "internal IS NULL OR internal != 1" ; }

     

    DOMSET alg_list_web "time_stamp=time_stamp desc+id desc" STATIC ;

    }



  • 7.  Re: Additional Search Arguments - Internal Log Comments

    Posted 06-29-2016 05:57 AM

    As suggested I've searched with act_log_all, and after a few combinations of searches it appears to be a solution. Here were some of my search arguments and results:

     

    (act_log.type = 'LOG') = 6 results

    (act_log_all.type = 'LOG') = 1719 results

    (act_log.analyst.userid = 'Bob') = 307 results

    (act_log_all.analyst.userid = 'Bob') = 331 results

    (act_log.analyst.userid = 'Bob' AND act_log_all.type = 'LOG') = 0 results

    (act_log_all.analyst.userid = 'Bob' AND act_log_all.type = 'LOG') = 66 results

     

    Based on the above it suggests that if I look for a combination of analyst.userid and type with act_log_all, I get what I am looking for. I don't know if @Gordon Preston can double-check my result to confirm that the raw SQL query generated does in fact include internal log comments before I accept this result.



  • 8.  Re: Additional Search Arguments - Internal Log Comments

    Posted 06-29-2016 10:50 AM

    I forwarded this information to CA Support and they were able to confirm that the answer supplied by Abdul Muqsith Imran Mohammed is in fact correct. See below copy from the case notes:

     

    I was able to retrieve the same results as you did, i simply edited a ticket which had only one activity log registered, I set the initial activity to be internal only. I verified the number of tickets created with the user servicedesk, they were 7, then after using the following where clauses, I got the results bellow

     

    (type = 'I' AND act_log_all.analyst.userid = 'ServiceDesk')

     

    Tickets that were found 7

     

    (type = 'I' AND act_log.analyst.userid = 'ServiceDesk')

     

    Tickets that were found 6

     

    In addition the SQL query used with this where clause do not include the restriction "( act_log.internal IS NULL OR act_log.internal != 1)", which confirms that if it is used the "act_log_all", should retrive all the activity log types.