CA Service Management

Expand all | Collapse all

Filters "Category" by the class of the "Configuration Item".

Jump to Best Answer
  • 1.  Filters "Category" by the class of the "Configuration Item".

    Posted 02-12-2016 07:53 AM

    Hi all,

     

    I need some help from you.

    I need that when the analyst to choose the "Configuration Item," depending on the CI class, the "Category" would be filtered. For example:

    • When the CI class is "router", the information that appeared in the "Category" start with "Router.*";
    • When the CI class is "switch", the information that appeared in the "Category" start with "Switch.*".

     

    Someone would have any idea how to solve this problem?



  • 2.  Re: Filters "Category" by the class of the "Configuration Item".

     
    Posted 02-13-2016 04:57 AM

    HI Sandro,

     

    Can you please elaborate the question in detail?

    Which Version of SDM are you using? category in Configuration Item list page?

     

    -Anil



  • 3.  Re: Filters "Category" by the class of the "Configuration Item".

    Posted 02-15-2016 01:43 PM

    Hi Anil,

     

    I'll explain the problem.

    When the analyst will open an incident, he chooses the Configuration Item, as shown in the image below.

    Image01.png

    The CI's Class is Router (Ex: RCE 5039482).

    When the analyst is select the "Incident Area (Category)", only appear the incident area to start with Dados.* and Elétrica.*.

    Image01.png

    Image01.png

     

    If the CI's class is Access Point, will only appear in the incident area to start with Voz.*.

     

    Image01.png

    I hope you can help me.



  • 4.  Re: Filters "Category" by the class of the "Configuration Item".

    Posted 02-23-2016 10:22 AM

    you will mostly need to create your own js/ajax function and call it with a onchange event on your Configuration Item field.

    Possible but will require been familiar  with ajax and a certain amount of coding there.

    Hope this help

    /J



  • 5.  Re: Filters "Category" by the class of the "Configuration Item".

    Posted 05-20-2016 05:04 PM

    Hi jmayer,

     

    I was looking for alternatives on this topic. I was able to build a function to trigger on onchange event, as you said, to change the value of "KEY.category" element on the form. However, the category field clears when I try to select a category starting with "Test.%", for example. I'm putting the code below:

     

    function fillArea() {
    
         var f = document.main_form;
         f.elements["KEY.category"].value = "Test.%";
    
    }    
    

     

    I thinkThis would be easily reachable using the extraURL attribute which is present in some PDM_MACRO definitions (specially dtlLookup macro) in WSP. However, the category field (pcat) is dtlHier, and doesn't contain the extraURL attribute.

     

    Do you think this attribute can be reachable by another way?

     

    Thanks!

     

    Diogo



  • 6.  Re: Filters "Category" by the class of the "Configuration Item".

    Posted 06-01-2016 10:22 AM

    Hello sandro.mello

    We have the same issue. Have you already resolved that?

     

    We agree with you that  the problem is on "dtlHier". As it don't have "extraURL" parameter we cannot pass values between the forms (detail_cr and hiersel_pcat_cr).

     

    We tested with PDM_SET also to try to keep values but the variables don't retains on the new form.

    We have no more ideas how relsove it.



  • 7.  Re: Filters "Category" by the class of the "Configuration Item".

    Posted 06-02-2016 02:33 AM

    Hi,

    I think you will need to play and modify the function itself.

    Have a look in the detail_form.js for the function detailHierEdit  to add the extraurl in the code and be able to pass it from the macro(you will need of course to modify the macro too ).

    Have a look in at the detailLookupEdit function a little down for an idea on how todo.

    Never tried myself for this particular so good luck

    Hope this help.

    /J



  • 8.  Re: Filters "Category" by the class of the "Configuration Item".
    Best Answer

    Posted 06-07-2016 01:57 PM

    Hello,

    I got a solution for dtlHier. Maybe this is not useful for your issue but was helpfull for me.

     

    First you must create a factory (in my case: 2 factories). Don't worry, you don't' need use WSP for that. Just copy the following files to directory MAJIC and recycles the enviroment.

     

    Patch: NX_ROOT\site\mods\majic

    File: zPcat_cr_TIN.mod

    OBJECT pcat {
      FACTORY zPcat_cr_TIN {
              STANDARD_LISTS {
                    SORT_BY "sym" ;
      WHERE "delete_flag = 0 AND cr_flag = 1" ; 
                    MLIST OFF ;
                    RLIST OFF ;
              };
    
    
      REL_ATTR persistent_id ;
        COMMON_NAME sym ;
        FUNCTION_GROUP "call_mgr_reference" ;
       };
    };
    

    File: zPcat_IN_TIN.mod

    OBJECT pcat {
      FACTORY zPcat_in_TIN {
              STANDARD_LISTS {
                    SORT_BY "sym" ;
      WHERE "delete_flag = 0 AND in_flag = 1" ; 
                    MLIST OFF ;
                    RLIST OFF ;
              };
    
    
      REL_ATTR persistent_id ;
        COMMON_NAME sym ;
        FUNCTION_GROUP "call_mgr_reference" ;
       };
    };
    

     

    Look the object. The new factories points to the object pcat. It works like a view of the pcat's factory. After recycling you can check in WSP if the new objects are listed.

     

    After restart, copy the files bellow and publish.

    hiersel_pcat_cr to hiersel_zPcat_CR_TIN;

    hiersel_pcat_in to hiersel_zPcat_IN_TIN;

    hierload_pcat_cr to hierload_zPcat_CR_TIN

    hierload_pcat_in to hierload_zPcat_IN_TIN

     

    Then, in the details_forms ("detail_in" and "detail_cr") you can point dtlHier to new factories, as the following example:

    <PDM_MACRO name=dtlHier hdr="Categoria da Solicitação TIC INTERNA (Área)" attr=category evt="onChange=\\\"change_category_func('cr',null,'zPcat_cr_TIN')\\\"" factory=zPcat_cr_TIN>
    

     

    After published, when you click in this field, you will see the newer hierload/hiersel.

    You can modify these forms for your specific needs, adding other parameters in PDM_LIST:

    <PDM_LIST PREFIX=list FACTORY=zPcat_in_TIN WHERE="${args.KEEP.HierWc:} AND zProcesso.code = 'TIN' AND in_flag = 1"
    HIER_KEY="$args.KEEP.HierKey">
    

     

    Of course, it doesn't solve the relation between the fields "IC" and "Category", but maybe it can show you the way.