CA Service Management

Expand all | Collapse all

SDM, 12.7 - Link to the change calendar

Jump to Best Answer
  • 1.  SDM, 12.7 - Link to the change calendar

    Posted 04-24-2015 01:54 PM

    Hi everyone,


    Is there a way to put a link to the Change Calendar on the employee interface screen, or even on an external portal?  We allow any employee to view any change order, and would like to be able to allow employees to see the scheduled changes via the calendar.

     

    Thanks.

    Tammy



  • 2.  Re: SDM, 12.7 - Link to the change calendar

    Posted 04-24-2015 03:42 PM

    Hi, the link to change calendar:

    http://hostname:8080/CAisd/pdmweb.exe?OP=SEARCH_RETURN_ALL+FACTORY=chg+HTMPL=list_chgsched.htmpl+QBE.EQ.active=1+KEEP.is…

     

    I think you also will need to copy list_chgsched.htmpl to employees form group. Also you should be able to add Change calendar tab for them.



  • 3.  Re: SDM, 12.7 - Link to the change calendar

    Posted 04-24-2015 03:50 PM

    Hi Gutis,

     

    I've replaced hostname with one of my secondary servers, but I'm getting this error:  AHD04400:Argument error

     

    Any ideas?

    Tammy



  • 4.  Re: SDM, 12.7 - Link to the change calendar

    Posted 04-24-2015 03:59 PM

    It may be a little bit different link for sd12.7 anyway you can check link under Administration->security and role management->role management->tabs Open Change_Calendar_tab and click there on the starting page, you will se the link there. In my case (14.1) there is:

    $cgi?OP=SEARCH_RETURN_ALL+SID=$SESSION.SID+FID=123+FACTORY=chg+HTMPL=list_chgsched.htmpl+QBE.EQ.active=1+KEEP.isHierSearch=0+schedInitialView=30+init=1+ADDITIONAL_WHERE=(sched_start_date>0)

    what is yours?



  • 5.  Re: SDM, 12.7 - Link to the change calendar

    Posted 04-24-2015 04:31 PM

    Mine has this:

    $cgi?OP=SEARCH_RETURN_ALL+SID=$SESSION.SID+FID=123+FACTORY=chg+HTMPL=list_chgsched.htmpl+QBE.EQ.active=1+KEEP.isHierSearch=0+schedInitialView=30+init=1+ADDITIONAL_WHERE=(sched_start_date>0)



  • 6.  Re: SDM, 12.7 - Link to the change calendar



  • 7.  Re: SDM, 12.7 - Link to the change calendar

    Posted 04-24-2015 05:00 PM

    I do have IIS -- but none of these worked either.... 



  • 8.  Re: SDM, 12.7 - Link to the change calendar

    Posted 04-24-2015 04:12 PM


  • 9.  Re: SDM, 12.7 - Link to the change calendar

    Posted 04-24-2015 04:53 PM

    Ahh, your link above worked when in the analyst role.  But I'm getting this error when I'm in the 'employee' role:

     

    AHD04407:CA Service Desk Manager html generation error. Could not find or process 'list_chgsched.htmpl'.

    AHD04714:Unable to open file list_chgsched.htmpl at ?: No such file or directory (2) userid=TZ26297

     

    You said previously that I would need to copy list_chgsched.htmpl to employees form group.  I just put that file in the employee folder here:(\site\mods\www\htmpl\web\employee), and did a pdm_webcache, but I'm still getting the error.

     

    Tammy



  • 10.  Re: SDM, 12.7 - Link to the change calendar

    Posted 04-24-2015 05:24 PM

    You will also need to copy list_chgsched_config.htmpl file, because it is included in list_chgsched.htmp. Also check that you copied files to the right server



  • 11.  Re: SDM, 12.7 - Link to the change calendar

    Posted 04-24-2015 06:06 PM

    So basically you need to do few things:

    1. copy 'list_chgsched.htmpl' and list_chgsched_config.htmpl

    2. copy setupSchedule(ApplComponent) functionfrom schedule.js to sitemod.js

    3. Modify setupSchedule(ApplComponent) function to exclude the following line when function called from employee interface:

    window.menubarFrame.ImgBtnChangeCaption("btnbackToList","Back_to_calendar");

    for this you can add additional parameter or do something else.

    Then after entering the link http://hostname:8080/CAisd/pdmweb.exe?OP=SEARCH_RETURN_ALL+FACTORY=chg+HTMPL=list_chgsched.htmpl+QBE.EQ.active=1

    You should get something like this:



  • 12.  Re: SDM, 12.7 - Link to the change calendar

    Posted 04-24-2015 06:27 PM

    Thanks, Gutis.

     

    I've done #1, and will try to do the others soon and get back to you.  We've decided that we want to put this link on another portal of ours, and not on the employee interface.  But I'll probably still need to do #3, since it's being displayed in the employee interface, right? 

     

    I'm also going to want to remove (hide) the 'Create New' button from the employee view....

     

    Thanks again for all the help!

    Tammy



  • 13.  Re: SDM, 12.7 - Link to the change calendar

    Posted 04-24-2015 06:41 PM

    You are welcome. To hide the 'Create New' button in 'list_chgsched.htmpl' change the following line:

    <PDM_MACRO name=sfStart create=true export=no factory=chg>

     

    to

     

    <PDM_MACRO name=sfStart create=false export=no factory=chg>



  • 14.  Re: SDM, 12.7 - Link to the change calendar

    Posted 04-25-2015 12:04 AM

    Hi Gutis,

     

    I'm definitely not a code expert, so I could use some help with #2 above.

     

    I'm not finding a sitemod.js file.  Am I supposed to create that file and put it in the site/mods directory, and the contents of that file should only be the 'setupSchedule(ApplComponent) function' part from the schedule.js file?

     

    And can you tell me the exact lines to copy from schedule.js file into the sitemod.js file?  I see the 'setupSchedule(applComponent) function, but I'm not sure where exactly it starts and where it ends.

     

    Thanks,

    Tammy



  • 15.  Re: SDM, 12.7 - Link to the change calendar
    Best Answer

    Posted 04-25-2015 01:11 AM

    Ok I think the easiest way will be to copy setupSchedule(ApplComponent) to 'list_chgsched.htmpl', I this case you will have original script for analysts and custom for employees. To do that I would suggest you to use notepad++.

    1. Open 'list_chgsched.htmpl' in notepad++ and search for function setupSchedule(ApplComponent)

    2. Once you find your function you will see minus sign on the left of it (marked in yelow)

    3. Click on minus sign this will collapse function, copy lines marked in my next picture

    4. Paste copied content in your custom 'list_chgsched.htmpl' file before </script> tag

    5. Rename copied function to setupScheduleemp(ApplComponent) and delete the following line: window.menubarFrame.ImgBtnChangeCaption("btnbackToList","Back_to_calendar");

    6. find the following line in list_chgsched.htmpl:

    <body class="list" onload="setupSchedule('change')">

    change it to

    <body class="list" onload="setupScheduleemp('change')">

    7. Find the following line:

    <PDM_MACRO name=sfStart create=true export=no factory=chg>

    change it to

    <PDM_MACRO name=sfStart create=false export=no factory=chg>

    8. Perform pdm_webcache, and clear the browser cashe (you can also use browsers private mode to ensure that you are not working with cached content)



  • 16.  Re: SDM, 12.7 - Link to the change calendar

    Posted 04-25-2015 11:53 AM

    Hi Gutis,


    Great instructions, thanks.  Just one more question, and I think I'll have it.. My Notepad ++ doesn't have the plusses/minuses to collapse or expand the sections.  Is that a view I need to turn on, or a plug-in that I need to add?



  • 17.  Re: SDM, 12.7 - Link to the change calendar

    Posted 04-25-2015 12:04 PM

    I think you need to tell to notepad that this is javascript or html. There is somewhere in toolbar menu

     

    Sent from my iPhone



  • 18.  Re: SDM, 12.7 - Link to the change calendar

    Posted 04-25-2015 12:42 PM

    Ok, I think I've got it!    I copied the function from the schedule.js file --- pasted it into the list_chgsched.htmpl file, before this:  </script>

     

    And my URL seems to be working great now!  Thank you so much...

     

    Tammy



  • 19.  Re: SDM, 12.7 - Link to the change calendar

    Posted 04-25-2015 01:07 PM

    Well, I guess I spoke a little too soon.  The calendar is loading on the page, but it doesn't seem to be functioning quite right. 

     

    1)  It says it's showing me the month of April --- but my test CO that is scheduled for April 25 is not showing.  When I click on show filter, the schedule start and end dates are empty.  (These get automatically populated with the current month's date ranges when you initially view the calendar as an analyst).  So it's showing you the calendar for April, but not any of the scheduled COs.

     

    Is it doing that because the below line was changed to false?

     

    <PDM_MACRO name=sfStart create=true export=no factory=chg>

    change it to

    <PDM_MACRO name=sfStart create=false export=no factory=chg>

     

    And when I navigate to another month (February 2016, for example), it then puts the current date ranges into the schedule start and end dates and shows me the month of April with the scheduled CO.

     

    2)  When I click on a CO to view it, I get the below message (I don't get this when using the Analyst role)

    Click on CO.png

     

    3)  After clicking OK to the above prompt, I see the CO in the list view.  When I click on it, the CO opens fine with the 'employee' view of the CO.  But there isn't a 'Close Window' button at the top right.

     

    Any help you can give for these last remaining tweaks is appreciated!

     

    Tammy



  • 20.  Re: SDM, 12.7 - Link to the change calendar

    Posted 04-25-2015 02:02 PM

    Which link do you use to open calendar

     

    Sent from my iPhone



  • 21.  Re: SDM, 12.7 - Link to the change calendar



  • 22.  Re: SDM, 12.7 - Link to the change calendar

    Posted 04-25-2015 02:11 PM

    Ok thats the problem for your first issue. This link was just for testing purposes. Please use the following link

    http://hostname:8080/CAisd/pdmweb.exe?OP=SEARCH_RETURN_ALL+FACTORY=chg+HTMPL=list_chgsched.htmpl+QBE.EQ.active=1



  • 23.  Re: SDM, 12.7 - Link to the change calendar

    Posted 04-25-2015 02:28 PM

    That URL works much better!  

     

    So I can live with the other things shown below, if they can't be fixed ---

     

    2)  When I click on a CO to view it, I get the below message (I don't get this when using the Analyst role)

    Click on CO.png

     

    3)  After clicking OK to the above prompt, I see the CO in the list view.  When I click on it, the CO opens fine with the 'employee' view of the CO.  But there isn't a 'Close Window' button at the top right.



  • 24.  Re: SDM, 12.7 - Link to the change calendar

    Posted 04-25-2015 05:17 PM

    Regarding your second issue. There is a script in schedule.js called:

    function buildNdayCalendar( days, startDate, evtFilter )

     

    You can copy it to 'list_chgsched.htmpl' file before </script> tag

    Then you need to remove the following line on the beginning of the script:

    showAlertmsg(evtFilter);

     

    cleanup server and browser cache.

     

    Test carefully all functionalities of calendar including maintenance windows and etc.



  • 25.  Re: SDM, 12.7 - Link to the change calendar

    Posted 04-25-2015 05:25 PM

    There is no close windows link because there is no such control in change employee form. There will be no close window link even if you open the change from employee home screen.



  • 26.  Re: SDM, 12.7 - Link to the change calendar

    Posted 04-25-2015 05:33 PM

    Yeah, I did figure that out later... Thanks.



  • 27.  Re: SDM, 12.7 - Link to the change calendar

    Posted 04-25-2015 05:32 PM

    Thanks, I think I'll just leave that prompt there for now.  It doesn't seem to hurt anything.  But I will save your instructions in case I want to remove it later, thanks!


    Tammy



  • 28.  Re: SDM, 12.7 - Link to the change calendar

    Posted 04-25-2015 05:34 PM

    You are welcome



  • 29.  Re: SDM, 12.7 - Link to the change calendar

    Posted 05-03-2015 02:25 PM

    Hi Gutis,

     

    Another question about the employee role being able to view the change calendar.....

     

    Can you tell me how to hide the 'Reopen Change' button from the employee view of a closed CO?  When an employee is viewing the change calendar, they can click on 'show filter' and change the filter to see closed COs, and when they view it that button is visible.  We removed the ability to look up closed COs from the employee interface, so that button never needed to be removed before.  That button isn't visible when looking up closed incidents and requests from the employee interface, so I was looking at the reopen function on those forms compared to the 'employee' detail_chg.htmpl form, but I'm not seeing any differences -- So it doesn't look like it is being hidden at the form level.

     

    Thanks.

    Tammy



  • 30.  Re: SDM, 12.7 - Link to the change calendar

    Posted 05-04-2015 02:55 AM

    You can simply comment or remove the following line in detail_chg.htmpl

     

    <PDM_MACRO name=button caption="Reopen Change" func=reopen_change() hotkey_name="Reopen Change" id=btn003>



  • 31.  Re: SDM, 12.7 - Link to the change calendar

    Posted 05-04-2015 06:46 AM

    Great, I'll try that.  Thank you!



  • 32.  Re: SDM, 12.7 - Link to the change calendar

    Posted 05-04-2015 01:48 PM

    Well, I commented out that line in the employee 'detail_chg.htmpl' form:

     

    // <PDM_MACRO name=button Caption="Reopen Change" Func=reopen_change() hotkey_name="Reopen Change" ID=btn003>

     

    I saved and published the change, did a pdm_webcache, but the button is still showing when opening the change order from the change calendar.  Is there maybe a different form that it's using when viewing from the calendar?

     

    Tammy



  • 33.  Re: SDM, 12.7 - Link to the change calendar

    Posted 05-05-2015 06:37 AM

    Strange it Works for me.

    1. Please check that you did modification to the detail_chg.htmpl form that is in site/mods and you did it for the right form group (by default %SDMROOT%\site\mods\www\htmpl\web\employee)

    2. Instead of using // try to comment using

    <PDM_IF 0>

    <PDM_MACRO name=button Caption="Reopen Change" Func=reopen_change() hotkey_name="Reopen Change" ID=btn003>

    </PDM_IF>

    3. Eensure that you did pdm_webcache



  • 34.  Re: SDM, 12.7 - Link to the change calendar

    Posted 05-05-2015 12:15 PM

    Hi Gutis,

     

    Yes, I've confirmed that I modified the right one.  And I've done the pdm_webcache again, and still see the button.

     

    But when I changed how I have it commented out to the below, that did the trick!

    <PDM_IF 0>

    <PDM_MACRO name=button Caption="Reopen Change" Func=reopen_change() hotkey_name="Reopen Change" ID=btn003>

    </PDM_IF>

     

    Thanks again!
    Tammy



  • 35.  Re: SDM, 12.7 - Link to the change calendar

    Broadcom Employee
    Posted 04-25-2015 03:17 PM

    Thank you for your diligent guidance here towards the solution Gutis. 


    It is very much appreciated !


    _R



  • 36.  Re: SDM, 12.7 - Link to the change calendar

    Posted 04-25-2015 03:53 PM

    Yes, Raghu... It is definitely appreciated!



  • 37.  Re: SDM, 12.7 - Link to the change calendar

    Posted 04-25-2015 12:18 PM

    You said this:  Open 'list_chgsched.htmpl' in notepad++ and search for function setupSchedule(ApplComponent)

     

    But I'm not finding that code in the list_chgsched.htmpl file -- it's in the schedule.js file -- did you mean to say copy it from there, into the custom 'list_chgsched.htmpl' file?



  • 38.  Re: SDM, 12.7 - Link to the change calendar

    Broadcom Employee
    Posted 04-27-2015 07:10 PM

    It is fantastic when community members help each other!

     

    Keep up the fantastic work everyone!