CA Service Management

Expand all | Collapse all

Relationship  parent  (inactive) / child (active)

  • 1.  Relationship  parent  (inactive) / child (active)

    Posted Aug 12, 2014 02:48 PM
      |   view attached

    I have the following problem: an active ticket is being related to another ticket with the inactive status, how to block this. Any idea?



  • 2.  Re: Relationship  parent  (inactive) / child (active)

    Posted Aug 12, 2014 05:14 PM

    I would love to know if there's a way to do this too...

     

    I have a stored query that I monitor to show open child tickets that are attached to closed parent tickets, so I can educate offenders:

     

    Syntax:

    parent.active = 0 AND active = 1

     

    Tammy



  • 3.  Re: Relationship  parent  (inactive) / child (active)

    Posted Aug 13, 2014 08:45 AM

      Tzadell,

    Your idea is good but does not meet the customer.

    I gave a simple solution to the client, inhibit access to
    inactive tickets, but he refused. He wants that analysts have access to
    inactive tickets but can not bind to other.



  • 4.  Re: Relationship  parent  (inactive) / child (active)

    Posted Aug 13, 2014 07:49 PM

    Hello Lrralves,

     

    I'm understanding your requirement better now.

    But I'm still having trouble phrasing exactly what you want, based on your two posts together, as they mention different aspects.

     

    1) Is this your combined request?:

    a) Analysts should be able to Edit Active tickets,  but NOT be able to form a Parent/Child Relationship to an Inactive ticket.

    b) Analysts should be able to Edit Inactive tickets, but NOT not be able to form a Parent/Child Relationship to another ticket (EITHER Active OR Inactive).

     

    Please confirm, or rephrase to show your requirements.

     

    2) What version are you on?

     

    Thanks, Kyle_R.



  • 5.  Re: Relationship  parent  (inactive) / child (active)

    Posted Aug 14, 2014 02:45 PM

    Hi Kyle_r,

     

    The version of  SDM is 12.7.

     

    Customer request:
    1° The analyst can see the inactive ticket, but can not make the
    link to an inactive ticket;
    Solution: I created a restriction of data partition (pre-update),
    in which analysts can not change inactive tickets;

    2° The analyst can not bind active children tickets to another
    inactive ticket. This can be done in two ways, follows attached
    screens. In any case I could not block the analyst to do this.
    Solution: Block access to inactive tickets for analysts trough
    data partition. The client did not accept.

     

     

    screen 1.png

    screen 2.png

     

    Thanks,



  • 6.  Re: Relationship  parent  (inactive) / child (active)

    Posted Aug 14, 2014 10:11 PM

    Hello Lrralves,

     

    Let me rephrase the query, to be sure I understand it:

     

    AIM

    IF a ticket (eg Incident) is "Inactive",

    THEN do NOT let anyone assign "Child tickets with Status of Active" to the ticket.

    (But DO ALLOW a Child ticket with Status of Inactive to be attached.)

     

    Is that right?

     

    I am still assuming that you are on a Portuguese version of CA SDM 12.7, based off the screenshots.

     

    Sorry about the time it is taking to establish the issue. If you wish to use another language, I will find someone in the office to translate. Or if you call into CA Support in your local region, they can take all of the details, and then reach out to me internally in CA if they need to.

     

     

    If the above query is right, then it seems difficult to know how to handle this without resorting to customisation.

     

    As a general comment, the ability to add to Inactive tickets, and add Inactive tickets to tickets, is commonly used.

    You may find that more of your Analysts will be unhappy that they can't do this, than you will make happy by putting in the restriction.

     

    As soon as I have your query straight in my own mind, we'll ask for further feedback from the Community.

     

    Thanks, Kyle_R.



  • 7.  Re: Relationship  parent  (inactive) / child (active)

    Posted Aug 19, 2014 12:04 AM

    Hello Lrralves,

     

    Reminder to check the last response.

     

    Thanks, Kyle_R.



  • 8.  Re: Relationship  parent  (inactive) / child (active)

    Posted Aug 12, 2014 11:28 PM

    Hello Tammy,

     

    Thanks for responding with that suggestion.

     

    That is a good way to identify Status "Open" child tickets where the parent ticket has been "Closed."

     

     

    Hello Lrralves

     

    1) What version are you on? It looks like SDM 12.9, Portugeuse, right(?).

     

    2) Is your issue:
    a) "This, specific child ticket remained open. Most others have worked fine."

    OR

    b) "It is always possible for us to close any parent tickets, while there is an open child"?

     

    3) Check if you have the Option "leave_children_open" which has description "The child incidents, requests, problems, changes, or issues, won't close when the parent is closed." (English text, obviously.) If this is not installed (or installed and set to "No"), then when a Parent ticket has its Status set to "Closed", then all of the children should be Closed as well, and the issue should not arise.

    So this switch affects 2b behaviour above. For 2a, maybe log a Support issue if it is a specific ticket/s only.

     

    4) Please note that the code only looks at Status = Closed, or more specifically, at "Symbol = CL" to perform this Closure of Children.

    If you have renamed the Symbol from "CL" to a different name, it won't work.

    (At least, that's the way it used to work on older English text versions of SDM.)

     

    5) Note Tammy's suggestion above of adding in a Stored Query to track open Children without active Parents. Put this onto an Administrator or high level Analyst Scoreboard to track.

     

    6) Depending on your needs, it may be possible to add Notification Events to either the Parent or the Child when various Status changes occur.

     

    7) As general tips - and not related to the given details of your query - here are some of the pages on the Community returned for a search on "parent child."

    Easy way to identify active parent tickets with no active children

    Parent Child CI tab.

    RE: SDM Change Management - Parent/Child Tickets

    Able to view Child Ticket from Parent/Child relationship tab for other Groups

     

    and something from an internal source which may also be helpful in this area, which I'm copying over (Thanks to original posters):

    ------------------------------

    Question: Challenge on SDM 12.6:

    Parent-Child tickets: Automatic modification of child ticket status when parent ticket status changes is not possible.

    Is that correct ? Is there any way to have it work? Or do we need more info on the use case ?

    Thanks very much, Lutz_Holzbecher

     

    Answer:

    Here are a few things you can try:

     

    i. On the Activity Notifications, there is a field named "Related Ticket Activity". You can set it to "Yes". This specifies if the activity log on a ticket is propagated to all related tickets (request/incidents/problems, change orders, and issues). The activity log propagation is only valid for related incidents, problems, and change orders.

    ii. The following options may be of interest to you:

    • leave_children_open - determines if the child tickets are closed or left open when the parent ticket is closed
    • force_rootcause - Force parent root cause on children
    • force_resolution_method - Force parent resolution method on children
    • force_resolution_code - Force parent resolution code on children
    • force_closure_code - Force parent closure code on children

     

    Regards, Brian_Mathato

    ------------------------------

     

    Let us know if that helps, and what specifically helps. Please flag any post as Helpful or Correct Answer if so.

     

    If not, please expand on the details of your query, and we'll try and help further.

     

    Thanks, Kyle_R.



  • 9.  Re: Relationship  parent  (inactive) / child (active)
    Best Answer

    Posted Nov 12, 2014 08:03 AM

    I found the correct answer, following steps:

    1° create a trigger in the schema designer in the cr object ("PRE_VALIDATE validate_parent(parent) 18 FILTER (EVENT("INSERT UPDATE")");

    2° create a code spel along the following lines:

    "

    cr::validate_parent(...) {

     

                // Altera parent do ticket inativo!!!

                string c_desc, c_num, c_persid, c_status, p_num, p_type, wc;

                object c_dob, c_list, group_leader, act_log_table_record;

                int c_count, i;

     

                wc = format("persistent_id = '%s'", parent);

     

        send_wait(0, top_object(), "call_attr", "cr", "sync_fetch", "MLIST_STATIC", wc, -1,0);

                c_count = msg[1];

                c_list = msg[0];

                if (c_count > 0) {

                            for(i=0;i< c_count;i++) {      

                                       send_wait(0, top_object(), "get_co_group");

                                       group_leader = msg[0];

    send_wait(0, c_list, "dob_by_index", "DEFAULT", i, i);

                                       c_dob = msg[0];

    send_wait(0, c_dob, "get_attr_vals",3,"ref_num","status", "persistent_id");

                                       c_num = msg[3];

                                       c_status = msg[6];

                                       c_persid = msg[9];

                           

                                      

                            }

                           

                }

               

                if (c_status == "CL") {

                set_error(1);

                set_return_data(" Ticket vinculado como pai é inativo, favor alterar!!! ");

                return;

                }

     

       

    }

     

    "

     

    The trigger works well!!!



  • 10.  Re: Relationship  parent  (inactive) / child (active)

    Posted Dec 30, 2015 07:24 AM

    Caro Lrralves, bom dia!

     

    Eu sei que já tem muito tempo seu post e que você já encontrou uma maneira de contornar a situação, mas como nós passamos pela mesma situação e seu post foi uma referência pelo suporte, gostaria de compartilhar nossas descobertas.

     

    Sugerimos a criação (ou melhoria) de uma option para isso neste link.

     

    Depois de uma análise sobre esse assunto, descobrimos que a causa desse comportamento se dá pelo comentário que foi realizado em um arquivo JavaScript.

    Logo, o comportamento esperado por nós já existia no sistema e por algum motivo foi desabilitado.

    O arquivo em questão é o "std_head.js" (NX\bopcfg\www\wwwroot\scripts\std_head.js) e o comentário realizado foi:

    /*Reverting the changes in SCO36099. David T. confirmed that the tickets are exception to the SCO36099

    I am not removing the domset added by this SCO,which can be used from other functions if required.

    if(factory=="cr"||factory=="pr"||

    factory=="in"||factory=="chg"||

    factory=="iss")

    url+="+KEEP.domset_name="+factory+

    "_list_web_active_only";

    else*/

     

    Realizamos o procedimento de customização desse arquivo (copiar para a pasta site\mods...), removemos o comentário e o comportamento para essa finalidade foi satisfatório.

    Perguntamos ao suporte o que é a SCO36099, o impacto da remoção do comentário, etc.

     

    Diante disso esperamos que a CA implemente a option, pois consideramos isso um bug ou um comportamento que segue um processo incomum.

     

     

    Atenciosamente,



  • 11.  Re: Relationship  parent  (inactive) / child (active)

    Posted Dec 30, 2015 08:26 AM

    Bom dia Rodrigo,

     

    Obrigado pela informação. vou testar aqui e aplicar pois me parece bem mais prático e menos trabalhoso do que a solução do script.

     

    Att,



  • 12.  Re: Relationship  parent  (inactive) / child (active)

    Posted Dec 30, 2015 09:09 AM

    Rodrigo,

     

    Testei aqui a sua solução, mas no meu caso não atende, porque a alteração no std_heads.js somente inibe a visualização mas permite que haja a vinculação de um ticket pai inativo a um filho ativo. Neste caso vou usar as duas soluções, a sua para inibir a visualização e a minha para proibir a vinculação caso o analista tenha o nr do ticket e ele já esteja fechado.

     

    Att,



  • 13.  Re: Relationship  parent  (inactive) / child (active)

    Posted Dec 30, 2015 11:52 AM

    Lrralves, boa tarde!

     

    Obrigado pelo feedback.

    Vou verificar a situação e te aviso qualquer novidade.

    Mas ainda assim eu considero que isso é um comportamento errado ao instalar a option "edit_inactive"...



  • 14.  Re: Relationship  parent  (inactive) / child (active)

    Posted Dec 30, 2015 03:08 PM

    Lrralves, boa noite!

     

    Pensei em montar uma URL semelhante a comentada no arquivo std_head.js usando a cláusula extraURL, mas realizando isso onde tivesse a chamada para o campo Pai.

    Seria mais ou menos isso:

    <PDM_MACRO name=dtlLookup hdr="Pai" attr=parent factory=in extraurl="+KEEP.domset_name=in_list_web_active_only">

     

    Mas não tive sucesso em meus testes.

    Será que você saberia montar essa URL?



  • 15.  Re: Relationship  parent  (inactive) / child (active)

    Posted Dec 31, 2015 05:42 AM

    Bom dia Rodrigogodoy,

     

    Infelizmente não, mas vou ver com alguns colegas aqui e se conseguir alguma coisa te falo. Mas o código que fiz não te ajuda? ele impede a vinculação dos tickets e ainda pode usar as duas soluções, pois elas se completam.



  • 16.  Re: Relationship  parent  (inactive) / child (active)

    Posted Jan 03, 2016 11:48 PM

    Hi All,

     

    As great as it is to have all the discussion, a reminder that the CA Communities board language is English.

     

    If working in another language, please provide at least a brief summary at the end so that the rest of us can follow along. 

     

    Thanks, Kyle_R.

    Moderator.



  • 17.  Re: Relationship  parent  (inactive) / child (active)

    Posted Jan 04, 2016 07:04 AM

    Hi Kyle_R,

     

    Sorry by this!

     

    We found a snippet of code that was commented by the SCO36099 that was the behavior be different than what we need.

    The file is "std_head.js" (NX\bopcfg\www\wwwroot\scripts\std_head.js) and the commentary:

    /*Reverting the changes in SCO36099. David T. confirmed that the tickets are exception to the SCO36099

    I am not removing the domset added by this SCO,which can be used from other functions if required.

    if(factory=="cr"||factory=="pr"||

    factory=="in"||factory=="chg"||

    factory=="iss")

    url+="+KEEP.domset_name="+factory+

    "_list_web_active_only";

    else*/


    The Ideia was created suggesting that improvement/correction because we believe it is an error when the option "edit_inactive" is enabled.

    Finally, we end with a doubt a call extraURL that would make the expected behavior that was commented in the JavaScript (SCO36099 above), but without success.

    <PDM_MACRO name=dtlLookup hdr="Pai" attr=parent factory=in extraurl="+KEEP.domset_name=in_list_web_active_only">

    Could you help this call extraURL?

     

     

     

     

    Lrralves, ajuda sim, mas é mais complexa e pode trazer algum efeito colateral à nossa implementação.

     



  • 18.  Re: Relationship  parent  (inactive) / child (active)

    Posted Jan 04, 2016 07:26 PM

    Thanks for the update.

     

    Sorry - I can't help with that PDM_MACRO statement.

     

    Can anyone else?

     

    Thanks, Kyle_R.