CA Service Management

Expand all | Collapse all

Xtraction - Close By field On incident dashboard

  • 1.  Xtraction - Close By field On incident dashboard

    Posted Jun 01, 2018 05:04 AM

    Dear Team

     

    I want to add the field 'Close By' for Incidents ticket  which should contain the analyst name who close the incident. for this i have   just modifed this log analyst text to 'close by' and tried to add this on dashboard. but it doesnt show the correct record..also once this added to dashboard.. duplication happen on some of the incidents.

     

    Then i tried to add the same expression on Request object (datasoucre--> servicedes--->views-->indents-->tables-->request) but then dashboard gives error.

     

    How to achieve this request so that Close by field contain correct analyst name who close .

     

    Thanks

     



  • 2.  Re: Xtraction - Close By field On incident dashboard

    Broadcom Employee
    Posted Jun 01, 2018 05:15 AM

    Hi Asim,

     

    The Request ticket has a filed log_agent which captures the user who make an update on the ticket.

    log_agent            SREL -> cnt.id REQUIRED TENANCY_UNRESTRICTED

     

    You may try to use this field and hope this will give you the correct results in showing the account with which this case was closed.

     

    Let me know if this helps



  • 3.  Re: Xtraction - Close By field On incident dashboard

    Posted Jun 03, 2018 07:18 PM

    Hi Maheswar

     

    Thanks for your input

     

     i cannot see  log_agent anywhere in xtraction datamodel under incident table...could you pls guide



  • 4.  Re: Xtraction - Close By field On incident dashboard

    Posted Jun 08, 2018 10:02 AM

    gbruneau can you please put your input also.



  • 5.  Re: Xtraction - Close By field On incident dashboard

    Posted Jul 16, 2018 02:36 AM

    Hi

     

    Can the issue still persist. Can anyone help out?



  • 6.  Re: Xtraction - Close By field On incident dashboard
    Best Answer

    Posted Jul 16, 2018 02:15 PM

    Log_agent contains the user that CREATED the ticket, not the one who modified it.

     

    The field that contains the last person who modified it is : last_mod_by.

     

     

    But in your case it may not be suitable.

     

     

    What you need to understand is that the information you want is in a related table. Relation is 1 to N wich means that an incident may be related to several activities and one activity is related to one and only one incident.

     

     

    When you query the ticket table and join it to the activity table, you may have a couple of activity per ticket. This is what you consider as a duplicate. But this is absolutely not a duplicate.

     

    If you want to retrieve the user that closed a ticket, you need to add a condition on the activity type, wich is 'CL' for close. Please note that if the ticket has been closed several times you will have multiple rows for this particular ticket.

     

     

    Otherwise, you can create a field in the REQUEST table in Xtraction and as the expression set this :

     

    (select COALESCE(cnt.last_name,'n/a') + ',' + COALESCE(cnt.first_name,'n/a')
    from (select call_req_id, analyst, type,row_number() over(order by id desc) as rn
    from act_log

    where act_log.type='CL' and call_Req_id= CR.persid) alg
    inner join ca_contact cnt
    on cnt.contact_uuid=alg.analyst where rn=1)

     

     

    You can try this query by running this is your SQL tools :

     

    select top 10000
    ref_num,
    (select COALESCE(cnt.last_name,'n/a') + ',' + COALESCE(cnt.first_name,'n/a')
    from (select
    call_req_id,
    analyst,
    type,
    row_number() over(order by id desc) as rn
    from act_log where act_log.type='CL' and call_Req_id= CR.persid) alg
    inner join ca_contact cnt
    on cnt.contact_uuid=alg.analyst where rn=1) as done_by

    from call_Req CR

     

     

    The "row_number" part purpose is to select the last close activity when there is multiple closure.



  • 7.  Re: Xtraction - Close By field On incident dashboard

    Posted Jul 27, 2018 07:49 AM

    Hi Pier

     

    what would be ID of field ?

     



  • 8.  Re: Xtraction - Close By field On incident dashboard

    Posted Jul 30, 2018 02:51 AM


  • 9.  Re: Xtraction - Close By field On incident dashboard

    Posted Jul 30, 2018 11:12 AM

    Sorry i was on vacation. You can put whatever you want in ID as it is an alias to reference it somewhere else in the datamodel.



  • 10.  Re: Xtraction - Close By field On incident dashboard

    Posted Aug 01, 2018 02:38 AM

    Hi pier

     

    I have added this field in incident Request table and reload datamodel. and added this column in dashboard but after this when i click to view records its giving error.

     

     

     

    following is for your information. -please advise

     



  • 11.  Re: Xtraction - Close By field On incident dashboard

    Posted Aug 01, 2018 09:27 AM

    I forgot to use the Xtraction alias for request. I've used CR but it's REQUEST. So go with this one :

     

    (select COALESCE(cnt.last_name,'n/a') + ',' + COALESCE(cnt.first_name,'n/a')
    from (select call_req_id, analyst, type,row_number() over(order by id desc) as rn
    from act_log
    where act_log.type='CL' and call_Req_id= REQUEST.persid) alg 
    inner join ca_contact cnt
    on cnt.contact_uuid=alg.analyst where rn=1)

     

     

    Don't forget to open the Expression editor completely to type the query in. Otherwise it may "cut" it.

     

     



  • 12.  Re: Xtraction - Close By field On incident dashboard

    Posted Aug 01, 2018 09:28 AM

    Works like a charm :

     



  • 13.  Re: Xtraction - Close By field On incident dashboard

    Posted Aug 01, 2018 02:19 PM

    HI Pier

     

    Perfect. its working now.

     

    Many thanks



  • 14.  Re: Xtraction - Close By field On incident dashboard

    Broadcom Employee
    Posted Jul 24, 2018 09:49 AM

    Sikander-lasani 

    Do you have any additional questions regarding this topic?

     

    If not, please mark one of the provided answers as Correct so that this thread can be closed.