Making a change calendar that includes maintenance events

RemiJohnson
Tera Contributor

We have been using the change schedule for several years that displays all the approved scheduled changes.   We would like this calendar to also display our repeating scheduled production and non-production maintenance windows and security vulnerability scans as calendar events, not changes.

To try to achieve this we installed the plug-in change.collision and created a maintenance calendar.   However, we don't want to have to look at a two calendars.   Any ideas on how to get
the maintenance calendar and change calendar to merge into one calendar view?

1 ACCEPTED SOLUTION

It only shows the Display field for the table.


View solution in original post

11 REPLIES 11

Hi Michael, added maintenance windows and changes calendars and created maintenance events which display perfectly.   My only issue now is I can't get the short description / event description for the changes to display. Only the change number displays (e.g., CHG0006614)


It only shows the Display field for the table.


Michael, thank you - had to check a display checkbox. Now it works great. Thank you for your help!!


find_real_file.png


ebak
Giga Contributor

I am having this same issue. However, if you change the display value of the change_request table to short_description, then that is the value that shows up in any reference field (eg. within incident, "Change Request" or "Caused by Change" would show the change's short description and not the number).



What I don't understand is there is code within the Schedule Page's Server AJAX processor that "looks like" it sets the short_description into the schedulePage item.


  var item = schedulePage.addItem(gr, start, end, '', color);


  if (item) {


    item.setDescription(gr.short_description.toString());


  }



However, all that displays is the Change number.


find_real_file.png



The start time of change is added before the Change Number AND only if the start time has no seconds in the time. (eg. 08:00:00 or 08:59:00). If there are seconds in the time (eg. 08:00:34) it just displays a *


find_real_file.pngfind_real_file.png




How can the short description be added to this calendar view beside the Change Number? Where does this "setDescription" method occur?



I then checked the script include for schedulePage and the third parameter is altName for the addItem function.


addItem: function(record, start, end, altName, color)



What does this parameter do? I tried just putting "TEST" for that parameter a couple of different ways.


I tried



var item = schedulePage.addItem(gr, start, end, 'TEST', color);



and then tried



item.setDescription('TEST');



It didn't seem to do anything (or I can't see where TEST was added)


Can anyone shed some light on this mystery?


ebak
Giga Contributor

Further to this, I found somewhere else in the community if you change
        item.setDescription(gr.short_description.toString());


to:


        item.setName(gr.number + ' = ' + gr.short_description);



Then you get the short_description to show in the view.



I took it one step further and am displaying a view more variables.


(I'm using a color variable to set different colors earlier on in the script when I'm checking dates and approval states)



    var name = gr.number + ' - ' + approval+ ' - START: ' + start + ' - END: ' + end + ' - ' + gr.short_description.toString();


    var item = schedulePage.addItem(gr, start, end, '', color);


    if (item) {


                if (gr.type == 'Comprehensive')


                            item.setName(priority + ' - ' + name);


                else


                  item.setName(priority + ' ' + gr.type.toUpperCase() + ' - ' + name);


      }



Also, if you need to expand the height of each box, put the following in the Client Script section of the schedule page.


        GwtCalendarViewMonthly.prototype.MAX_HEIGHT = 35;



If you want any headings on top of the calendar (I put a legend explaining the colors), put something like the following in the HTML section of the schedule page


<p>This view contains only "Work in Progress" changes. (Changes whose approval are Not Yet Requested or in Support are omitted)</p><h4>Legend</h4><table bgcolor="#000000"><tr><td bgcolor="#06FB4A" align="right">Green :</td><td>Fully Approved</td></tr><tr><td bgcolor="#85929E" align="right">Grey :</td><td>Not Yet Approved</td></tr><tr><td bgcolor="#F7FC06" align="right">Yellow :</td><td>Not Yet Approved but Planned Start Date within 7 days</td></tr><tr><td bgcolor="#E74C3C" align="right">Red :</td><td>Not Yet Approved but Planned Start Date has past</td></tr></table>