CA Service Management

 View Only
  • 1.  Stored Querys

    Posted Apr 12, 2016 11:29 AM

    Hello Guys,

     

    I need some help with some querys, i need to create a query that told me when my ticket is next to violate the SLA. (You know when the ticket number is orange in SD). I try with the following queries but they doesn't work:

     

    • (group.[group]group_list.member IN (@cnt.id)) AND active = 1 AND macro_predict_viol = 1
    • (group.[group]group_list.member IN (@cnt.id)) AND active = 1 AND predicted_sla_viol = 1

     

    I also want to create a query that only bring me the open tickets of a certain group. I think something like this would help but it doesn't work, any suggests?

     

    • group_id = \’ 0x2A97BF63E650C542A38F5D53027B47AD\’ AND active = 1

     

     

    Thanks in Advance!

     

     



  • 2.  Re: Stored Querys

    Posted Apr 12, 2016 12:33 PM

    Hi Jason,

     

    My stored query for 'My Incidents Soon to Breach SLA' uses a time span, and looks like this:

    active = 1 AND attached_slas.time_to_violation < EndAtTime(\'TODO_TODAY\') AND type = \'I\' AND (assignee IS NULL AND group.[group]group_list.member IN (@cnt.id))

     

     

    And for the open tickets of a certain group, try this (in my example, VENDOR is the name of the group)

    group.last_name LIKE \'VENDOR%\' AND active = 1 AND status != \'RE\'

     

    Hope that helps!
    Tammy



  • 3.  Re: Stored Querys
    Best Answer

    Posted Apr 12, 2016 01:25 PM

    Hi,

    I always prefer to use id when possible for stored queries are they are more efficient  in ter of resources.

    for creating stored queires you need to refer the attributes of the current object.

    for the group as an example in your case

    you need to use group and not group_id that don't exist on the cr object.

    also to refer field with UUID you need to note it as U'xxxxxxxxxxxxxxxx' with \ as escape characters  and not refer to the sql reprenstation (0x)

     

          group = U \’ 2A97BF63E650C542A38F5D53027B47AD\’ AND active = 1

     

    Not in front of an env (currently in a train) and don't remember by hard the predicted sla flag naming but using bops_sinfo -d cr on the server wil lprovide you will all the attributes you can refer on the cr object and you can grab the exact attribute name from it and construct your query as you was trying to do:

     

         group.[group]group_list.member IN (@cnt.id) AND active = 1 AND <to find with the command above> = 1

     

    You can also fine usefull example like above in the SDM admin guide

     

    hope this help

    /J