Modifying schedule page

Maria DeLaCruz
Tera Guru

Hi,

I created a schedule page similar to the "Windows and Changes" pages, and would like to modify the information being displayed.     I was able to modify what it displays (change number plus the Short Description), but the Short Description gets cut off if it's too long.   It seems that the maximum number of lines displayed is only 2.   Also, it's only displaying the planned started time, and I'm not sure how to get it to display both the start time and end time.  

Please help.

Thanks,

Maria

SchedulePage.jpgCalendar view.JPG

9 REPLIES 9

Jotiram Yadav
Tera Expert

Hello @Maria



I have a similar requirement. I am trying to create a schedule page of type calendar. But when I try to access that page only calendar is shown, I can not see any schedules or scheduled items in it.



Below is the code that I have written in Server Ajax processor.



var gr = new GlideRecord('cmn_schedule');


gr.initialize();


gr.addQuery('type','blackout');


gr.query();


while(gr.next()){


  schedulePage.addSchedule(gr.sys_id,'#000',null,true);


}


var change = new GlideRecord('change_request');


change.query();


while(change.next()){


  var start = change.start_date.getDisplayValue();


  var end = change.end_date.getDisplayValue();


  var item = schedulePage.addItem(change,start,end,'','#FA5858');


  if(item){


  item.setName(change.number);


  }


}



Am I missing something here ? I can see only calendar view, no items.


calendar.JPG


Could you please assist me here ?



Thanks in advance.



Regards,


Jotiram


How are you accessing the page? It should be like:



https://<instanceName>/show_schedule.do?sysparm_type=<Schedule type>&sysparm_include_view=monthly,weekly,daily,oldtimeline



Replace instanceName and Schedule type with the correct value. Also, make sure you have change requests for the time period you are viewing. I see you are viewing the calender for May 2015, check if you have any change requests whose planned start date or planned end date lie in May 2015


Hello Probir,



I was trying below URL,


https://<instance name>/show_schedule_page.do?sysparm_page_sys_id=<sys id>



The one which you suggested did work. Thank you



Regard,


Jotiram


Hello Probir,



Similarly I want to access the gantt chart. I have used URL as mentioned in wiki,


https://<instance name>/show_schedule_page.do?sysparm_page_schedule_type=gantt_chart&sysparm_timeline_task_id<sys_id of page >



Is this the correct way. I am not sure about the "sysparm_timeline_task_id". Which value should be passed to this param.


I got the below error while loading the page.


gantt.JPG


Could you please assist here ?



Thanks in advance.



Regards,


Jotiram