CA Service Management

 View Only

Expand all | Collapse all

How to stop resolved of parent incident ticket without resolving Child Ticket

  • 1.  How to stop resolved of parent incident ticket without resolving Child Ticket

    Posted Aug 19, 2024 05:29 AM

    Hi team,

    How to stop resolved of parent incident ticket without resolving Child Ticket

    To achieve this, I am writing conditional macro code below and attaching it to "Request Transition," but I faced bad where code error. I have provided the code and error below. Kindly help me resolve this.

    TABLE Spell_Macro
    del description fragment last_mod_by last_mod_dt lock_object msg_html
    msg_tmpl_info ob_type sym tenant type usr_integer1 usr_integer2 usr_integer3
    usr_string2 usr_string3 usr_string4 
    { "0" ,"",
    "string wc;\\0012int active_count;\\0012wc = format(\"parent = %s AND status != 'RE'\", persistent_id);\\0012 send_wait(0, top_object(), \"call_attr\", \"cr\", \"sync_fetch\", \"MLIST_STATIC\", wc, -1,0);\\0012 active_count = msg[1];\\0012logf(SIGNIFICANT,\"%s\",active_count);\\0012 if (active_count > 0) {\\0012 set_return_data(FALSE);\\0012 }else\\0012 {\\0012 set_return_data(TRUE);\\0012 }","" ,"" ,"0" ,"",
    "" ,"cr" ,"Check for Active Childs" ,"" ,"COND" ,"" ,"" ,"",
    "" ,"" ,"" }

    08/19 14:50:04.37 SMR-CASDM-BG domsrvr                 9172 ERROR        where.y                908 Parse error at : "parent = cr:931696 AND status != 'RE'" (Bad where clause)
    08/19 14:50:04.37 SMR-CASDM-BG spelsrvr                7040 ERROR        pcexec.c              6509 Spell interp failed at Check for Active Childs:6:: Reply message [1]: bad index - size is 1
    08/19 14:50:04.37 SMR-CASDM-BG spelsrvr                7040 ERROR        macro.spl              538 Check for Active Childs:6:
    08/19 14:50:04.37 SMR-CASDM-BG spelsrvr                7040 ERROR        macro.spl              538 Reply message [1]: bad index - size is 1
    08/19 14:50:04.45 SMR-CASDM-BG web:local              10144 ERROR        freeaccess.spl       26006  update checkin of cr:931696 failed: AHD05919:Error executing status transition condition macro.


  • 2.  RE: How to stop resolved of parent incident ticket without resolving Child Ticket
    Best Answer

    Posted Aug 19, 2024 08:55 AM
    Edited by CA Tool Aug 20, 2024 01:44 AM

    You must use simple quotes on your parent field in where clause.

    I think that's works fine.

    It's look likes as:

    string wc;
    int active_count;
    wc = format("parent = '%s' AND status != 'RE'", persistent_id);
    send_wait(0, top_object(), "call_attr", "cr", "sync_fetch", "MLIST_STATIC", wc, -1,0);
    active_count = msg[1];
    logf(SIGNIFICANT,"%s",active_count);
    if (active_count > 0) {
    set_return_data(FALSE);
    }else
    {
    set_return_data(TRUE);
    }



    ------------------------------
    Regards,
    Felipe Vandrilho

    Linkedin: https://www.linkedin.com/in/vandrilho/
    ------------------------------