CA Service Management

Expand all | Collapse all

Pulling the ACL time_stamp data

Jump to Best Answer
Domagoj Hrzic

Domagoj Hrzic04-12-2018 07:37 AM

  • 1.  Pulling the ACL time_stamp data

    Posted 10-25-2017 07:58 AM

    Hi all i'm doing some workOrder template that pulls data on button click from detail_in.


    Does anybody know how to pull the transfer time_stamp?

     

    I would like to show it next to Close Date/Time.

     

    Any idea?

     

    Thanks,

    Domagoj

     

     



  • 2.  Re: Pulling the ACL time_stamp data

    Posted 10-25-2017 10:15 AM

    Also have  a question with pulling the prop values.

    When integrated USS_SC in catalog form i defined ca_sdm_prop_1, ca_sdm_prop2,...


    How to collect the values, ex:

     

    var myAssignee = '<PDM_FMT PAD=NO ESC_STYLE=C>$args.assignee.first_name</PDM_FMT>'; -works

    var myProp1 = '<PDM_FMT PAD=NO ESC_STYLE=C>$prop.prop_4</PDM_FMT>'; -this does not

     

    Regards,

     

    Domagoj



  • 3.  Re: Pulling the ACL time_stamp data

    Posted 04-12-2018 06:59 AM

    Hi Michael,

     

    i have an situation when using this

     

    var mySolution = ' ';

    <PDM_LIST PREFIX=mylist3 where="call_req_id='$args.persistend_id' AND type='RE'" factory=alg>

       mySolution = "$mylist3.description";

    </PDM_LIST>

     

    detail_in.htmpl is breaking

     

    when this description is "large"



  • 4.  Re: Pulling the ACL time_stamp data

    Broadcom Employee
    Posted 10-25-2017 09:03 AM

    In looking at this, the Incident object does not carry a transfer date field, so one way I could envision this working would be to include customisation in which code is executed whenever one does a transfer to write the date/time of the transfer onto a custom transfer date field

     

    One of the problems I am noticing is that the date field you are interested in copying is from the incident activity log, which is a separate object from the incident object itself.  Further, it is conceivable that an incident can be transferred multiple times, so it would be ambiguous which date you would want to pull from the activity log, if it was the first transfer, the latest transfer, or something in between.



  • 5.  Re: Pulling the ACL time_stamp data

    Posted 04-12-2018 07:18 AM

    I suppose that this is because <br> tag is in description.



  • 6.  Re: Pulling the ACL time_stamp data
    Best Answer

    Posted 10-25-2017 11:36 AM

    Regarding your original question , you might want to try someting like

     

    var mytime=99999999999;
    <PDM_LIST PREFIX=mylist WHERE="call_req_id='$args.persistent_id' and type='TR'" FACTORY=alg>
    if( $mylist.time_stamp_INT_DATE < mytime ) mytime=$mylist.time_stamp_INT_DATE;
    </PDM_LIST>
    alert(date_to_string(mytime));

     

     

    Regarding your 2nd question you can try( for the first property value):

    var myProp1 = '<PDM_FMT PAD=NO ESC_STYLE=C>$args.properties.0.value</PDM_FMT>'

     

    Regards

    .........Michael



  • 7.  Re: Pulling the ACL time_stamp data

    Posted 10-25-2017 09:24 AM

    Yes, David this is correct.

     

    Any other idea? I'm trying to collect from log activites the first appereance of Transfer with JS function to target the string of ex: this.nth-child(2).innerHTML?

    Trying with this but with no result.



  • 8.  Re: Pulling the ACL time_stamp data

    Posted 04-12-2018 07:37 AM

    ESC_STYLE=C solved



  • 9.  Re: Pulling the ACL time_stamp data

    Posted 10-26-2017 04:47 AM

    Michael, one more thing. To call the user who actually resolved the ticket from activity log:

     

    missing something..

     

    var stringNAME = new String();
    <PDM_LIST PREFIX=mylist2 WHERE="call_req_id='$args.persistent_id' and type='RE'" FACTORY=alg>
     stringNAME=$mylist2.analyst;
    </PDM_LIST>



  • 10.  Re: Pulling the ACL time_stamp data

    Posted 10-26-2017 03:06 AM

    Thank Michael. Works like a charm.



  • 11.  Re: Pulling the ACL time_stamp data

    Posted 10-25-2017 03:49 PM

    Thanks Michael_Mueller !    @dhrzic  - does this give you the info you need?



  • 12.  Re: Pulling the ACL time_stamp data

    Posted 10-30-2017 03:40 AM

    Hint: always use $args.... surrounded by double quotes at least

    stringNAME="$mylist2.analyst";

    or even better

    stringNAME="$mylist2.analyst.combo_name";

    And be aware, that each of these pdm_list statements produces a db query each time an incindent is viewed.



  • 13.  Re: Pulling the ACL time_stamp data

    Posted 10-25-2017 09:30 AM

    Hi Domagoj,

    I cant think of anything off hand here - this one is a bit out of our scope as it requires custom code, thus we dont have a ton of exposure to this type of thing.  There are lots of folks out here though that have shared a lot of great stuff they have come up with, so I am hoping that someone can give you some ideas to help you out here.

    Can anyone else offer some in sight to Domagoj ?



  • 14.  Re: Pulling the ACL time_stamp data

    Posted 12-19-2017 04:34 AM

    Hi Michael, got another type of issue, need to pull out the entire logs activities. Any idea how to pull that out?

     

    Thanks

     

    Domagoj



  • 15.  Re: Pulling the ACL time_stamp data

    Posted 10-30-2017 03:59 AM

    Ok, thanks for help Michael.

     

    Regards,

     

    Domagoj



  • 16.  Re: Pulling the ACL time_stamp data

    Posted 12-19-2017 06:32 AM

    Hi Domagoj.

    while

    <PDM_LIST PREFIX=mylist WHERE="call_req_id='$args.persistent_id' and type='TR'" FACTORY=alg>
     gets only the TRansfer activities of the current ticket, changing the where clause a bit will fetch all activities of the current ticket:

    <PDM_LIST PREFIX=mylist WHERE="call_req_id='$args.persistent_id'" FACTORY=alg>

     

    Nevertheless I'm wondering if this is efficient. This kind of implementation will fetch each activity entry for each Ticket Detail regardless of the number of activities of the ticket....

    It might harm the overall response time of your system.

     

    Regards

    ...........Michael



  • 17.  Re: Pulling the ACL time_stamp data

    Posted 12-19-2017 06:59 AM

    Ok, so what i need to do is to print out the whole alg on separate page, any idea how to do this?

     

    for now i'm pulling ticket fields, to vars

     

    and then constructing a url to transfer it to new custom .html form in which we fill it then.

     

    Customer wants to print out the whole ticket log activites



  • 18.  Re: Pulling the ACL time_stamp data

    Posted 12-19-2017 07:56 AM

    Two ideas I have in mind : take a look at the standard summary and detail Report (Report menu) and adopt it,

    or create a separate htmpl file, which creates your print layout, where you can use the same PDM tags and $args references as in a normal htmpl file.

    call this by

    ... OP=SHOW_DETAIL+HTMPL=your file here+FACTORY=cr+PERSID=your ticket persid ...

    Hope this helps

    Regards

    .............Michael



  • 19.  Re: Pulling the ACL time_stamp data

    Posted 12-19-2017 11:17 AM

    Michael,

     

    so for example i also need to pull the log solution.

     

    var mySolution = ' ';

    <PDM_LIST PREFIX=mylist3 where="call_req_id='$args.persistend_id' AND type='RE'" factory=alg>

       mySolution = $mylist3.description;

    </PDM_LIST>

     

    And not working..



  • 20.  Re: Pulling the ACL time_stamp data

    Posted 12-19-2017 11:31 AM

    For Log Solution activities try type='SOLN'

    and as mentioned earlier use at least double quotes around you server variables

    ...

    mySolution = "$mylist3.description";

     

    regards

    ............Michael



  • 21.  Re: Pulling the ACL time_stamp data

    Posted 12-19-2017 12:46 PM

    Oh, again forget the quotes.. Thanks Michael.