113 views

Description

Formatted schedule report can be misaligned due to missing roster data cells.

Steps to Reproduce

 

In Scripts - Background, execute the following code:

var sdt = new GlideScheduleDateTime();
gs.log(sdt);
sdt.addSeconds(1)
var newSdt = new GlideScheduleDateTime(sdt);
gs.log(newSdt);

The following error message is displayed:

Attempted script access to inaccessible member denied - com.glide.glideobject.ScheduleDateTime:com.glide.glideobject.ScheduleDateTime:(Lcom/glide/glideobject/ScheduleDateTime;)

Workaround

The problem stems from the use of GlideScheduleDateTime in the buildScheduleEmail and buildDataEmail functions in the FormattedScheduleReport script include. In order for the tempStart variable to be initialized correctly, the display value (String) needs to be passed rather than a GlideScheduleDateTime object.

Adjust the script include as follows:

  • In the buildScheduleEmail function, the lines that call buildDataEmail should pass the display value for start and end. Change the instances of the following line:
    this.buildDataEmail(rotaGR, start, end);
    to
    this.buildDataEmail(rotaGR, start.getDisplayValue(), end.getDisplayValue());

  • In the buildDataEmail function, change the line that resets tempStart from
    // Updating loop variables tempStart = new GlideScheduleDateTime(tempEnd);
    to
    // Updating loop variables tempStart = new GlideScheduleDateTime(tempEnd.getDisplayValue());

 


Related Problem: PRB679706

Seen In

There is no data to report.

Fixed In

Istanbul

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2017-10-04 06:49:05
Published:2017-04-07