Clarity Service Management

Expand all | Collapse all

Right click to assign to logged user

Jump to Best Answer
  • 1.  Right click to assign to logged user

    Posted 02-08-2018 12:37 PM

    Hi,

     

    I came with the idea to create a "button" in the right click menu called "Assign to me" when the analyst is listing the incidents form. I know this is a "transfer", but by creating this it will be only one click for our analysts.

     

    Unfortunately I'm struggling to achieve this. When I call a spell to do this it gives me a timeout.

     

    To do this I've:

     

    Created a new OP in www root

    op_custom.cfg

    Z_TEST z_test MODIFY UPDATE

     

    I added the following menu item under Update Status:

    stdlist.js

    ctxMenu.addItem("Assign to me", "z_assin2me(self.activePersid, ahdtop.cstID)");

     

    function z_assin2me(argPersistentID, curr_user) {

    var url = cfgCgi + 

    "?SID=" + cfgSID + 

    "+FID=" + fid_generator() + 

    "+OP=Z_TEST" + 

    "+FACTORY=cr" + 

    "+PERSID=" + argPersistentID + 

    "+TEST_VAL=" + curr_user;

    display_new_page( url, ahdframeset.workframe );

    }

     

    Created the spel

    z_test(...){

       int arg0; 

       object arg1; 

       arg0 = argv[0]; 

       arg1 = argv[1]; 

      dump_args(arg1);

     

    send_wait(0, top_object(), "call_attr", "cr", "dob_by_persid", 0, arg1.PERSID); 

    crobj = msg[0]; 

    send_wait(0,top_object(), "call_attr", "cnt", arg1.TEST_VAL); 

    who = msg[0]; 

    send_wait(0, crobj, "call_attr", "summary", "set_val", who, "SURE_SET");

    }

     

    Can you guys help?

     

    Note that I'm a newbie with spel.

     

    Thanks 



  • 2.  Re: Right click to assign to logged user
    Best Answer

    Posted 02-09-2018 01:28 AM

    Hi,

    if you're interested in spel, here is a place to start from: SPEL API: BOP Manual Chapters.

    Regarding to your code, you missed one base thing, to modify object - you need to switch it to edit mode first.

    btw: there was same requirement from gbruneau described here: https://communities.ca.com/docs/DOC-231156358?commentID=233957376#comment-233957293, and as I remember he successfully achieved it, hope he provide it to you

    Regards,

    Timur Alimov



  • 3.  Re: Right click to assign to logged user

    Posted 02-09-2018 10:30 AM

    It helped a lot.

    Thank you.