CA Service Management

Expand all | Collapse all

Web Service - Know only Resolved tickets from Web Service

Jump to Best Answer
  • 1.  Web Service - Know only Resolved tickets from Web Service

    Posted 04-10-2018 11:17 AM

    Hello everybody, I have an issue, I'm trying to know all ticket in resolved status and in SOAPUI I have this query

     

        <ser:doSelect>
         <sid>586393225</sid>
         <objectType>cr</objectType>
         <whereClause>
         group.last_name LIKE 'EUS_ZONA%'
         OR group.last_name like 'EUS_ Region%'
          OR group.last_name like 'EUS_ZSur%'
          OR group.last_name like 'EUS_Desktop%' AND status = 'RE' AND type='I' AND open_date > 1517454000 AND         open_date &lt; 1519786800</whereClause>
         <maxRows>-1</maxRows>
         <attributes>
    <!--1 or more repetitions:-->
    <string>ref_num</string>
    <string>target_times.sym</string>
    <string>support_lev.sym</string>
    <string>open_date</string>
    <string>agt.id</string>
    <string>priority</string>
    <string>tenant.id</string>
    <string>tenant.name</string>
    <string>log_agent</string>
    <string>request_by.first_name</string>
    <string>request_by.first_name</string>
    <string>customer.first_name</string>
    <string>customer.last_name</string>
    <string>customer.id</string>
    <string>category.id</string>
    <string>category.sym</string>
    <string>status</string>
    <string>status.sym</string>
    <string>group.id</string>
    <string>group.last_name</string>
    <string>zreporting_met.id</string>
    <string>zreporting_met.sym</string>
    <string>assignee.combo_name</string>
    <string>open_date</string>
    <string>close_date</string>
    <string>description</string>
    <string>summary</string>
    </attributes>

    </ser:doSelect>

     

    And this always returns me all tickets in all status. In WhereClause I tried too (status.code IN ('%5200%', '%5208%', '%400202%')) because maybe with Resolved status doesn't work, I tried too status.sym LIKE '%Resol%', and my last try was status = 'RE' and it didn't work either. Someone can help me? Forwards thanks!!!



  • 2.  Re: Web Service - Know only Resolved tickets from Web Service

     
    Posted 04-10-2018 12:45 PM

    I think you need to open this in the service desk forum not Client Automation.

     

    Richard Lechner

    Principal Engineering Services Architect

     

    CA Technologies

    Mobile: +1 703 655 7161 | Richard.Lechner@ca.com

     

    <mailto:Richard.Lechner@ca.com>[CA]<http://www.ca.com/us/default.aspx>[Twitter]<http://twitter.com/CAInc>[Slideshare]<http://www.slideshare.net/cainc>[Facebook]<https://www.facebook.com/CATechnologies>[YouTube]<http://www.youtube.com/user/catechnologies>[LinkedIn]<http://www.linkedin.com/company/1372?goback=.cps_1244823420724_1>[Google]<https://plus.google.com/CATechnologies>[Google+]<http://www.ca.com/us/rss.aspx?intcmp=footernav>



  • 3.  Re: Web Service - Know only Resolved tickets from Web Service

    Posted 04-10-2018 01:12 PM

    thanks for the advice! I will do it



  • 4.  Re: Web Service - Know only Resolved tickets from Web Service

    Posted 04-11-2018 12:09 AM

    How about trying to use parenthesis in the where clause:
    ( group.last_name LIKE 'EUS_ZONA%' 
         OR group.last_name like 'EUS_ Region%'
          OR group.last_name like 'EUS_ZSur%'
          OR group.last_name like 'EUS_Desktop%' )
    AND status = 'RE' AND type='I' AND open_date > 1517454000 AND         open_date &lt; 1519786800

     

    Hope that helps.
    Regards
    ......Michael



  • 5.  Re: Web Service - Know only Resolved tickets from Web Service

    Posted 04-11-2018 02:27 AM

    Here's my 2 cents...

     

    For a start...try with the where clause set to status = RE AND type = 'I'. See what returns and add the rest one by one to see it breaks or not.

     

    ===

    Kind Regards,

    Brian



  • 6.  Re: Web Service - Know only Resolved tickets from Web Service

    Posted 04-11-2018 08:53 AM

    It didn't work either, thanks!



  • 7.  Re: Web Service - Know only Resolved tickets from Web Service

    Posted 04-11-2018 08:59 AM

    please elaborate a bit more than just: it didn't work.

    a whereclause : status='RE' and type='I'  should return only incidents in status Resolved.

    Please confirm.



  • 8.  Re: Web Service - Know only Resolved tickets from Web Service

    Posted 04-11-2018 09:15 AM

    Michael, in the where clause when I put only status = 'RE' AND  type='I' it works, but if I add to it the other clause :

     group.last_name LIKE 'EUS_ZONA%' 
         OR group.last_name like 'EUS_ Region%'
          OR group.last_name like 'EUS_ZSur%'
          OR group.last_name like 'EUS_Desktop%' 

    it returns all the status not just RE status, the CL status, SUSPEND status, etc, but I fix it with the querys above



  • 9.  Re: Web Service - Know only Resolved tickets from Web Service

    Posted 04-11-2018 08:53 AM

    I tried it and it didn't work either, thanks!



  • 10.  Re: Web Service - Know only Resolved tickets from Web Service
    Best Answer

    Posted 04-11-2018 08:57 AM

    I fix it making 2 querys the first one was:

     

          group.last_name LIKE 'EUS_ZONA%' 
         OR group.last_name like 'EUS_ Region%'
          OR group.last_name like 'EUS_ZSur%'
          OR group.last_name like 'EUS_Desktop%' AND type='I' AND open_date > 1517454000 AND         open_date &lt; 1519786800

     

    and the second with the ids from the result, the final query is this:

     

          status.id = 5200 OR status.id = 5208 OR status.id = 400202 AND
          id IN ('903608', '903558', '903373', '903240', '903206', '902742', '902287', '901541', '901471', '901275',
          '900814', '900865', '900398', '900267', '900135', '900031', '900088', '900021', '900107', '899670', '899053', '899049',
          '899046', '898892', '898885', '898795', '898679', '898602', '897774', '897708', '897534', '897615', '897613', '897611',
          '897606', '897598', '897482', '897476', '897472', '897240', '897357', '897195', '896983', '897004', '897001', '896886',
          '896911', '896633', '896614', '896477', '896283', '896322', '896256', '896149', '896127', '896103', '895843', '895765',
          '895492', '895481', '895561', '895416', '894815', '894606', '894540', '894518', '894517', '893642', '893776', '892708',
          '892654', '892423', '892494', '891976', '891842', '891784', '891803', '891324', '891387', '891322', '891321', '891250',
          '891248', '891137', '890786', '890675', '890672', '890620', '890329', '890286', '890284', '890143', '889878', '889395',
          '889353', '889350', '889171', '889011')

    And that works for me thanks for everything!



  • 11.  Re: Web Service - Know only Resolved tickets from Web Service

    Posted 04-11-2018 09:16 AM

    I hardly suggest , not working with two separate queries. That doesn't make sense and produces unnecessary load. Instead, as suggested work with parenthesis.