CA Service Management

 View Only
  • 1.  How to ADD contact_type into agt (agent) factory

    Posted Jul 25, 2019 07:57 AM
    Hello, we are getting trouble with Any_contact options... if its installed, it is possible to add group contacts into assignee field while creating call_req from detail form. The problem is that we wanted to filter out theese group type contacts from popup hints while creating tickets. I tried to customize Any_contact.maj file, customize detail.htmpl form with extraurl="ADDITIONAL_WHERE=(type=2307 OR type!=2308)" clause to lookup element, or modify sitemods.js but with no results...

    If Any_contact option is not installed, only Analyst contact_types (contact_type = 2307) are shown in whisperer popup window while filling Assignee attribute, but we must be able to fill in Supervisors, Technicians, Managers contact types which are members of groups.

    Is there any solution for this or do anyone some hints what to try next ?

    Thank you very much,
    Best regards,
    Petr P.


  • 2.  RE: How to ADD contact_type into agt (agent) factory

    Posted Jul 26, 2019 01:36 AM
    Hi Petr,

    I would be inclined to create a new factory and add 'factory=<mynewfactory>' in the PDM_MACRO line defining the Assignee field in detail_in / detail_cr / detail_pr.  Alternatively you could modify the 'agt' factory, but that will also affect what appears in detail_chg and you may not want that.  See bopcfg\majic\base.maj for the out-of-box 'agt' factory definition, put your version in a maj file in site\mods\majic.

    Bear in mind that if your assignee contacts are not 'licensed' (set in their Access Type) then even if assigned they will not be able to access a ticket.

    Hope that helps,
    Regards,
    James

    ------------------------------
    Senior Consultant
    HCL
    ------------------------------



  • 3.  RE: How to ADD contact_type into agt (agent) factory

    Posted Jul 26, 2019 02:03 AM
    Hello,
    thank you very much for advice, I will try it right now. We are comfortable with both options, and very thanks for info about Access Type of assignee, It is very useful to keep it mind in this case. I tried modify agt factory couple of times in the start of this week but with no success to set all types except group (2308) in RESTRICT "type = 2308" { type!= 2308} ; It just give me always error in std.logs that is not possible to make this way becasue "=" is expected. Do you have any solution for this definition? can this be multiplied for every wanted contact_type? even if I make it for Technicians only (2301) like "RESTRICT "type = 2301" { type = 2301} ;" in base.maj file situated in site\mods folder, it wasnt ensure that Technicians were visible from detail forms. I was digging where else could be defined agt factory to type 2307 and found in cmpcd.spl but it is partialy encrypted file so it is dead end for me. But Thank you very much, I will keep trying :)

    So If I want to create new factory I will use definition from base.maj file with my new name of factory lets sasy z_agt and put it in some file in site\mods .maj file? Do I I understand you well ? So far we have no customization on factory level.

    FACTORY z_agt {
    RESTRICT "type = 2307" { type = 2307} ;

    DOMSET agt_list "combo_name,phone_number,contact_num,organization,location" "" DYNAMIC;


    STANDARD_LISTS {
    SORT_BY "combo_name,phone_number,contact_num,organization=organization.name,location=location.name";
    WHERE "delete_flag = 0" ;
    MLIST OFF ;
    RLIST OFF ;
    };

    REL_ATTR id ;
    COMMON_NAME combo_name ;
    FUNCTION_GROUP "contact" ;
    } ;

    Thank you once again for your help and effort :)

    Best regards,
    Petr P.


  • 4.  RE: How to ADD contact_type into agt (agent) factory
    Best Answer

    Posted Jul 26, 2019 04:52 AM
    Edited by Christopher Hackett Dec 03, 2019 06:52 PM
    Hi Petr,
    there are a couple of complications that I didn't alert you to (and was reminded of when I tried this on my 'sandbox').  When you create a new factory you must also add the corresponding detail and list forms.  For 'z_agt' you can copy the detail_cnt and list_cnt forms into site\mods\www\htmpl\web\analyst and rename them.  You will need to substitute 'factory=z_agt' for 'factory=cnt' in numerous places in list_z_agt.

    The other thing I would change is the DOMSET name above, which should probably be 'z_agt_list' rather than 'agt_list'.

    Here is my version.  My factory is named 'zagt'.  The filter restriction 'type <> 2308' seems to be driven by the first component of the 'RESTRICT' statement - there are several examples in base.maj where the quoted restriction doesn't match the part between { and }.  Someone else may be able to comment on why that is.

    OBJECT cnt {
    FACTORY zagt { RESTRICT "type <> 2308" { type = 2308 } ;
    DOMSET zagt_list "combo_name,phone_number,contact_num,organization,location" "" DYNAMIC;
    STANDARD_LISTS {
    SORT_BY "combo_name,phone_number,contact_num,organization=organization.name,location=location.name";
    WHERE "delete_flag = 0" ;
    MLIST OFF ;
    RLIST OFF ;
    };
    REL_ATTR id ;
    COMMON_NAME combo_name ;
    FUNCTION_GROUP "contact" ;
    } ;
    } ;

    You may find further complications - for example, on my sandbox, clicking the 'Assignee' link on the detail_cr form opens the Search dialog rather than showing a list of contacts, though when I click the 'Search' button the contacts listed are correct according to the factory definition.  The list_cnt form is used for many different selections and has built-in logic that may not be 100% correctly triggered by this new factory.

    Regards,
    James



    ------------------------------
    Senior Consultant
    HCL
    ------------------------------



  • 5.  RE: How to ADD contact_type into agt (agent) factory

    Posted Jul 29, 2019 10:16 AM
    Hello,
    Thank you very much for this advice, I was able to make new factory z_agt with "FACTORY zagt { RESTRICT "type <> 2308" { type = 2308 } ;" with new list and detail forms created from cnt forms. And it hase impact that into Assignee, I can fill only contacts with contact type != 2308 or contact type IS NOT NULL, but now I have a problem with Assignee filling when group is already selected. 
    Now when I select group XYZ and want to type in assignee (which should be filtered only from group XYZ) in popup window is again whole contact list (except group types)

    So do you have any idea please what to try to fix this group membership > assignee functionality please?
    Anyway, this is one step forward :)

    Thank you very much.

    Best regards,
    Petr P.



  • 6.  RE: How to ADD contact_type into agt (agent) factory

    Posted Sep 19, 2019 06:32 AM
    Hello,
    It's been some time and we are still struggling with group membership if group is filled before assignee. Now we have 50% of wanted functionality thanks to you, but this little bug is now preventing from production usage.
    Does anybody any hint how to provide groupmembership form function on custom factory z_agt? :)

    Thank you very much in advance for any hint.. :)

    Best regards,
    Procházka Petr


  • 7.  RE: How to ADD contact_type into agt (agent) factory

    Posted Oct 16, 2019 04:27 AM
    Hello,
    it's so long since last update of this task and we are still stucked at 50% of the desired functionality.
    Does anybody some hint about how to make group membership filter of custom z_agt factory work ?

    Thank you very much for any kind of help with it.

    Best regards,
    Procházka Petr