CA Service Management

Expand all | Collapse all

r14.1 Customize Go Button - Search multiple ticket types

Jump to Best Answer
  • 1.  r14.1 Customize Go Button - Search multiple ticket types

    Posted 07-05-2016 11:10 AM

    Reviewing both the ServiceDeskUsers and Tiago MACUL's Blog at:

     

    http://www.servicedeskusers.com/R12_Go_button_Search_Customization

     

    I tried to follow the same for r14.1.02 and found that the get_go_sel_arr() function does not exist.

    Has anyone completed this for r14.1?

     

    thanks,

     

    J.W.



  • 2.  Re: r14.1 Customize Go Button - Search multiple ticket types

    Posted 07-11-2016 03:39 AM

    Actually, we have had similar go resources since quite some time and also have it working in 14.1.

     

    We never used the get_go_sel_arr function you refer to.

     

    All we had to do was create a Go resource web form, then add it to the roles you want it for.

     

    This is the resource value we typically use for the go resource:

    $cgi?OP=SEARCH+SID=$SESSION.SID+FID=123+FACTORY=zrip+SKIPLIST=1+QBE.IN.ref_num=$searchKey



  • 3.  Re: r14.1 Customize Go Button - Search multiple ticket types

    Posted 07-11-2016 04:20 AM

    Little remark, you have refered to custom factory: +FACTORY=zripz,

    but I hope that this query should work with OOTB factory too:

    +FACTORY=tkt

    or

    +FACTORY=cr

     

    Regards,

    cdtj



  • 4.  Re: r14.1 Customize Go Button - Search multiple ticket types

    Posted 07-11-2016 04:27 AM

    Indeed, I was trying to answer as close as possible to J_W's post, he/she referred to that custom factory through the link included in the original post, hence me trying to add that zrip to the resource value



  • 5.  Re: r14.1 Customize Go Button - Search multiple ticket types

    Posted 07-15-2016 01:40 PM

    Hi J_W - Did any of the responses help answer your question? If so please mark as Correct Answer. Thanks!



  • 6.  Re: r14.1 Customize Go Button - Search multiple ticket types

    Posted 07-21-2016 04:15 PM

    I've been away for some time.  I will try this resource and let you know.  Thanks for the help.

     

    J.W.



  • 7.  Re: r14.1 Customize Go Button - Search multiple ticket types

    Posted 07-22-2016 04:50 PM

    When I try:

    $cgi?OP=SEARCH+SID=$SESSION.SID+FID=123+FACTORY=tkt+SKIPLIST=1+QBE.IN.ref_num=$searchKey

    and save as "All IPR Tickets" and then assign to a Role; then the entire go_btn area, including the product_name and image is blank. There are no errors in stdlog.  I logged out and I cleared the browser cache.  Occurs in both IE and Chrome.

     

    A bop_sinfo on tkt shows valid responses.  It does not matter whether I remove the existing individual Incident, Request, and Problem web forms from the Role first.  Other Roles for the same logged in user are not affected.

     

    What am I overlooking?

     

    Thanks,

     

    J.W.



  • 8.  Re: r14.1 Customize Go Button - Search multiple ticket types

    Posted 07-27-2016 02:12 PM

    Hi cdtj - Any other ideas for J_W? Thanks!



  • 9.  Re: r14.1 Customize Go Button - Search multiple ticket types

    Posted 07-28-2016 07:58 AM

    hi,

    second version with FACTORY=cr worked for me:

    OP=SEARCH+FACTORY=cr+SKIPLIST=1+QBE.EQ.ref_num=$searchKey

    Regards,

    cdtj



  • 10.  Re: r14.1 Customize Go Button - Search multiple ticket types

    Posted 08-01-2016 12:12 PM

    Hi J_W - Did any of the responses help answer your question? If so please mark as Correct Answer. Thanks!



  • 11.  Re: r14.1 Customize Go Button - Search multiple ticket types

    Posted 07-29-2016 03:32 PM

    I have accomplished this in our environment by removing any reference at all to the factory.

     

    $cgi?OP=SEARCH+SID=$SESSION.SID+FID=123+SKIPLIST=1+QBE.IN.ref_num=$searchKey

     

    It works, but does anyone see any potential issues with this?



  • 12.  Re: r14.1 Customize Go Button - Search multiple ticket types

    Posted 06-07-2018 08:30 AM

    My option does not seem to work in 17.1. Tried the steps originally outlined by jmayer and it seems to have worked perfectly in 17.1.



  • 13.  Re: r14.1 Customize Go Button - Search multiple ticket types

    Posted 08-02-2016 10:53 AM

    Still no joy - using FACTORY=cr or no FACTORY at all.

     

    I checked the Role to which I was adding the web form (Administration) and it was using a modified menu tree since I had previously added new Application Data entries available to be created and editing from the Admin interface.

     

    So I added the "All IPR Tickets" web form to a Role which had never been modified and I still get the same results of the blank go_btn area.  (I did clear the web cache first).  Both IE and Chrome.

     

     

    J.W.



  • 14.  Re: r14.1 Customize Go Button - Search multiple ticket types

    Posted 08-02-2016 11:20 AM

    I was able to get the resource created and showing on a separate DEV system.  But now when I log in via IIS and try to use it the browser returns the following (IE and Chrome):

     

    When I log in via Tomcat, I get the following:

     

    Ticket 620 is active.

     

    J.W.



  • 15.  Re: r14.1 Customize Go Button - Search multiple ticket types

    Posted 08-02-2016 12:44 PM

    1. Found the cut-and-paste error in the last update.  The initial blank out of the go_btn row was caused by a CR/LF at the end of the Resource Field.

    2. Corrected the cut-and-paste error for the resource which was causing the double escape error.

     

    Now, I am left with the result that the search only returns the ticket type if I change the resource to the specific factory

     

    Requests

    or Incidents

     

     

    I've tried using no 'default for Object Type' and also no FACTORY in the Resource and variations on all of those.

     

    J.W.



  • 16.  Re: r14.1 Customize Go Button - Search multiple ticket types
    Best Answer

    Posted 08-03-2016 07:58 AM

    Hi.

    you need to have  your own factory and refer to it in the resource link to have this to work.

     

    $cgi?OP=SEARCH+SID=$SESSION.SID+FID=123+FACTORY=z_cr_all+SKIPLIST=1+QBE.IN.ref_num=$searchKey

     

    the factory can be easely created with a mod file like below. Copy/paste the code into below into a factories.mod file and place it in your site/mods/majic folder. Note that you will need to recycle SDM for the change to take effect.

     

    //used for creating custom factory on object when needed JMayer 101508

    //New factory to display all cr in list disregarding cr type

    OBJECT cr {
    FACTORY z_cr_all{
      DOMSET template_list "template_name" "" DYNAMIC ;

      DOMSET zcrall_list "open_date desc, ref_num desc" "" STATIC;

      STANDARD_LISTS {
       SORT_BY "open_date DESC, id DESC, status, priority DESC, ref_num" ;
       MLIST OFF ;
       RLIST OFF ;
      };

      REL_ATTR persistent_id ;
      COMMON_NAME ref_num ;
      FUNCTION_GROUP "call_mgr" ;
    } ;
    };

     

    Note that you will need to create the corresponding htmpl forms for that new factory too.

    just create a detail_z_cr_all.htmpl file with just the code below to redirect to the correct form afterwards:

     

    <PDM_IF 0>JMAYER 2011/08/14: detail_z_cr_all.htmpl. When we search for all R/I/P we need to reroute to the appropriate factory form</PDM_IF>

    <PDM_IF "$args.type" == "I">

    <PDM_INCLUDE FILE=detail_in.htmpl>

    <PDM_ELIF "$args.type" == "P">

    <PDM_INCLUDE FILE=detail_pr.htmpl>

    <PDM_ELSE>

    <PDM_INCLUDE FILE=detail_cr.htmpl>

    </PDM_IF>

     

    Proven to work since r11 and up to last r14.1 cp2

     

    Using that concept and extending it to the list form and menu_sd you can either have a new search in your menu listing all the tickets together

     

    Hope this help.

     

    /J



  • 17.  Re: r14.1 Customize Go Button - Search multiple ticket types

    Posted 08-03-2016 04:55 PM

    That was the missing piece.  I had saved the custom factory mod as a .test until I resolved the original issue with the (now) non-existent function and then tried to continue using the suggestions of the standard factories.

     

    The GO button is working as expected now.  I have not completed the option to allow the same from the Search menu.

     

    I'm marking jmayer 's response as correct as it brings the discussion around to the beginning; but thanks to everyone who contributed.

     

    BTW, the original post I referenced no longer shows the in-line images in my browsers.  I assume they were deep linked to the old SDU site and are orphaned at this point.

     

    J.W.



  • 18.  Re: r14.1 Customize Go Button - Search multiple ticket types

    Posted 08-31-2016 03:15 PM

    If you're hoping to get this to work in the "Go Resource" as well, use the following.

     

    $cgi?OP=SEARCH+SID=$SESSION.SID+FID=123+SKIPLIST=1+QBE.IN.ref_num=$searchKey


  • 19.  Re: r14.1 Customize Go Button - Search multiple ticket types

    Posted 09-01-2016 03:19 AM

    Hello Alex,

     

    if you use my concept you will then better reference the factory too.

    That ensure that the correct list form will be displayed as SDM use the factory name to construct the corresponding form name to display.

     

    $cgi?OP=SEARCH+SID=$SESSION.SID+FID=123+FACTORY=z_cr_all+SKIPLIST=1+QBE.IN.ref_num=$searchKey

     

    my 2 cents

    /j



  • 20.  Re: r14.1 Customize Go Button - Search multiple ticket types

    Posted 10-04-2016 03:50 PM

    We're doing something similar to this except our users also want to omit entering the prefix on the incident/problem number.  I have everything working except I can't figure out the Resource piece of it to allow a like.  This is as close as I've gotten:

     

    $cgi?
    OP=SEARCH+SID=$SESSION.SID+FID=123+FACTORY=cr+SKIPLIST=1+QBE.EQ.ref_num%20like%20%27%$searchKey%27

     

    Any thoughts on how I might do this?



  • 21.  Re: r14.1 Customize Go Button - Search multiple ticket types

    Posted 10-04-2016 03:59 PM

    I'm not sure this will work, but worth a shot.  If your prefix is two characters try adding two underscores directly before $searchkey.  If this works, it'll treat the underscores as single character wildcards.

     

    $cgi?OP=SEARCH+SID=$SESSION.SID+FID=123+FACTORY=z_cr_all+SKIPLIST=1+QBE.IN.ref_num=__$searchKey



  • 22.  Re: r14.1 Customize Go Button - Search multiple ticket types

    Posted 10-05-2016 11:48 AM

    Try

    QBE.IN

    or

    QBE.KY

    instead of your QBE.EQ



  • 23.  Re: r14.1 Customize Go Button - Search multiple ticket types

    Posted 10-05-2016 12:09 PM

    That did it!  Thank you, thank you.  This gives me what I want.  It's a bit more than the two character prefix, but it works.

    OP=SEARCH+SID=$SESSION.SID+FID=123+FACTORY=z_cr_all+SKIPLIST=1+QBE.IN.ref_num=%25$searchKey



  • 24.  Re: r14.1 Customize Go Button - Search multiple ticket types

    Posted 10-05-2016 01:14 PM

    I also found the single character wild card works, however, you have to use the ? instead of _  .  So this works: OP=SEARCH+SID=$SESSION.SID+FID=123+FACTORY=in+SKIPLIST=1+QBE.IN.ref_num=??$searchKey 



  • 25.  Re: r14.1 Customize Go Button - Search multiple ticket types

    Posted 09-17-2018 11:06 AM

    Hi Jerome;

     

    could you please help me withe the factory syntax for 17.1 version?

     

    If I try your syntax, I got error message: mods/majic/factories.mod:3 syntax error, unexpected $end, expecting YACC_METHODS at "¢

     

    //used for creating custom factory on object when needed JMayer 101508

    //New factory to display all cr in list disregarding cr type

    OBJECT cr { 
    FACTORY z_cr_all{
      DOMSET template_list "template_name" "" DYNAMIC ;

      DOMSET zcrall_list "open_date desc, ref_num desc" "" STATIC;

      STANDARD_LISTS {
       SORT_BY "open_date DESC, id DESC, status, priority DESC, ref_num" ;
       MLIST OFF ;
       RLIST OFF ;
      };

      REL_ATTR persistent_id ;
      COMMON_NAME ref_num ;
      FUNCTION_GROUP "call_mgr" ;
    } ;
    };



  • 26.  Re: r14.1 Customize Go Button - Search multiple ticket types

    Posted 09-18-2018 03:40 AM

    HI,

    This is clearly working for me in 17.1, there is no change there between 14.1 and 17.1

    The error you receive is typically due to a statement not be closed so please verify in your mod that you are not missing a ";' somewhere else.

    Hope this help

    /J



  • 27.  Re: r14.1 Customize Go Button - Search multiple ticket types

    Posted 09-25-2018 11:06 AM

    Confirmed, it works also in 17.1 

    My mistake...sorry



  • 28.  Re: r14.1 Customize Go Button - Search multiple ticket types

    Posted 09-09-2016 10:30 AM

    Hi jmayer,

     

    Using your .mod and detail file I've mostly figured out this customization.  I built the list form from scratch and the only part I haven't figured out is the right click activity menu.  Were you able to get this working on your list_z_cr_all form?  If you have any advice I would appreciate it.  Thanks!

     

    Adding the following two variables to list_z_cr_all exposes the right click menu.  However, upon selecting an option it will open up the records detail form instead of the activity form.

     

    var cfgContextActivities = true;
    var cfgContextSolution = true;



  • 29.  Re: r14.1 Customize Go Button - Search multiple ticket types

    Posted 09-12-2016 01:37 AM

    HI gbruneau,

    I'm fact I can reproduce here, apparently this have changed with 14.x because was working for age (since 11) )and the fun is that nobody reported the problem after the upgrade to 14.1.

    Will have a look as soon I got 2 mn (busy week)

    /J



  • 30.  Re: r14.1 Customize Go Button - Search multiple ticket types

    Posted 10-04-2016 03:39 PM

    Hi jmayer,

     

    I spent some time on this and found that two variables are not being passed to the activity window.

     

    Here's a bit of code that builds the Log Comment activity, self.activePersid and self.activeFactory are not passed to the activity.  This code lives in resultset.js.

    ctxMenu.addItem( msgtext("Log_Comment..."), // Log Comment...
    "rsDoActivity(self.activePersid, self.activeFactory, 'LOG')" );

     

    I'm not sure how to set these variables from list_z_cr_all, maybe you'll have better luck.

     

    To confirm the variables were not being set, I added the following code to sitemods.js.  This works fine, but hardcodes the activity to one ticket.

     

    function siteContextMenuitemAdd(menuName,menu)
    {
    if ( propFormName == "list_z_cr_all.htmpl" && menuName == "idDetailsMenu" ) {
    menu.addItem( "Test Comment", "rsDoActivity('cr:400609', 'in', 'LOG')" );
    }
    }



  • 31.  Re: r14.1 Customize Go Button - Search multiple ticket types

    Posted 10-04-2016 06:06 PM

    Hi again,

     

    I figured this out!!  The problem was with the custom factory associated to the z_cr_all object.  The right click menu was passing z_cr_all instead of the tickets factory to the right click menu options.  The following additions to sitemods.js will manually add the activities to the z_cr_all.htmpl list form.  Note, you need to make sure cfgContextActivities and cfgContextSolution are commented out on list_cr_all.htmpl.

     

    stdmods.js

    // Copyright (c) 2005 CA.  All rights reserved.
    // sitemods.js,v 1.9 2005/01/14 00:29:45

    function siteContextMenuitemMod( menuName, menu ) {
        // Removes right click Help on this Window from list_z_cr_all.htmpl
        if ( propFormName == "list_z_cr_all.htmpl" && menuName == "idDetailsMenu" && menu == "Help on This Window..." ) {
           return false;
       }
        // Removes menuitem "Print Form list_z_cr_all.htmpl..."
        if ( propFormName == "list_z_cr_all.htmpl" && menuName == "idDetailsMenu" && menu == "Print Form list_z_cr_all.htmpl..." ) {
           return false;
       }
    }

    function siteContextMenuitemAdd(menuName,menu)
    {
    if ( propFormName == "list_z_cr_all.htmpl" && menuName == "idDetailsMenu" ) {
    menu.addItem( "Update Status...", "rsChangeStatus(self.activePersid, 'cr', 'ST')" );
    menu.addItem( "Callback...", "rsDoActivity(self.activePersid, 'cr', 'CB')" );
    menu.addItem( "Research...", "rsDoActivity(self.activePersid, 'cr', 'RS')" );
    menu.addItem( "Log Comment...", "rsDoActivity(self.activePersid, 'cr', 'LOG')" );
    menu.addItem( "Solution...", "rsDoActivity(self.activePersid, 'cr', 'SOLN')" );
    menu.addItem( "Transfer...", "rsTransfer(self.activePersid, 'cr', 'TR')" );
    menu.addItem( "Escalate...", "rsTransfer(self.activePersid, 'cr', 'ESC')" );
    menu.addItem( "Manual Notify...", "rsTransfer(self.activePersid, 'cr', 'NF')" );
    menu.addItem( "Print Form...", "CAisdPrint()" );
    }
    }


  • 32.  Re: r14.1 Customize Go Button - Search multiple ticket types

    Posted 04-28-2017 11:33 AM

    I received a similar request, but my folks want to see Change, Request, and Incident all at once.  Any ideas there?  While this example really helps with the CR tickets, I'm a little lost when it comes to trying to bridge between the 2 tables.



  • 33.  Re: r14.1 Customize Go Button - Search multiple ticket types

    Posted 05-02-2017 10:49 AM

    I don't believe there is a supported procedure for creating a union between the tables in the web UI.  I'm sure others here may have developed a custom solution along those lines. 

     

    I used to write SQL for CABI reports and then the customer could access those on demand.  Now most of my customers use the Xtraction for CA Service Desk Manager (third-party) as this has all the joins available out of the box and even a sample report of a breakdown of all outstanding tickets by group across all ticket types.

     

    J.W.