CA Service Management

 View Only
  • 1.  Change the color of comments in logs

    Posted Jul 27, 2018 05:07 AM

    Hello ,

     

    I want to change the color of comments from other logs in CA Service Desk logs section of Incident/problem/request tickets.

    Currently default color is blue, Can we change the color from blue to any other color.

     

    Thanks

    MM



  • 2.  Re: Change the color of comments in logs
    Best Answer

    Posted Jul 27, 2018 12:17 PM

    Hi Mayur,

     

    It's possible by customization. you can customize list_alg.htmpl page like following;

     

    1. define a fmtFunc on list_alg.htmpl

     

    Function setColor(value) {
    if (value == "Yorum Eklendi") //Yorum Eklendi = Log Comment
    rs.data("<span style='color: red'>"+value+"</span>")
    else
    rs.data(value);
    }

     

    set the function to ftmfunc attribute on lsCol  which you define attr=type like following

     

    <PDM_MACRO name=lsCol hdr="Tipi" attr=type fmtfunc=setColor link=yes sort=no>

     

    sample screen;

     

     

    Best Regards,

    Türker



  • 3.  Re: Change the color of comments in logs

    Posted Jul 30, 2018 05:23 AM

    Hello Turker,

     

    Thanks for sharing the java script code for the list.alg.htmpl form.

     

    I have added the below

    Function setColor(value) {
    if (value == "Log Comment") //Yorum Eklendi = Log Comment
    rs.data("<span style='color: red'>"+value+"</span>")
    else
    rs.data(value);
    }

     

    <PDM_MACRO name=lsCol hdr="Type" attr=type fmtfunc=setColor link=yes sort=no>

     

    I am getting blank screen at the logs section.

     

    Please share your inputs on the same.



  • 4.  Re: Change the color of comments in logs

    Posted Jul 30, 2018 06:36 AM

    Thanks for the solution. I resolved by replacing capital F of function to small f.

     

    Thanks Turker.

     

    Can you also provide some logic to include contact.userid=="abc" in same if condition like below

    if (value == "Log Comment" && analyst.userid == "abc") 

    this is not working as of now. I have also used as var analystID = "$args.QBE.EQ.analyst.userid"; and used as below condition

    if (value == "Log Comment" && analystID == "abc")

    But this is also not working.

     

    Thanks

    Mayur