Skip to content

sc-roster

This document is a user guide for the sc-roster component release version 7.1.24.

go-to-typical-definition

sc-roster-field-Example-1-Image-1-Annotated

 

1 Purpose

The sc-roster component places an interactive gantt chart field on a form, displaying a list of Resources and the Tasks (if any) assigned to them, where:

  • Resource data (e.g. Resource name) is retrieved from Resource documents.

  • Task data (e.g. start date/time, end date/time, assigned Resource(s)) is retrieved from Task documents.

  • Resources are listed vertically down the left side of the gantt chart.

  • A timeline runs horizontally across the top of the gantt chart.

  • Tasks are represented by Task bars below the timeline, each adjacent to the resource it is assigned to. The start date/time, end date/time and duration of a Task determine the length of a Task bar and its position under the timeline .
  • A red vertical dateline highlights the current date/time.

The sc-roster gantt chart provides or can be defined with the following functions:

  1. The ability to scroll vertically up and down the list of resources.

  2. The ability to scroll horizontally across the timeline.

  3. The ability to drag and drop a Task bar allowing a Task to be resheduled to an earlier of later time leaving its duration unchanged OR to reassign the Task to a different Resource. When a Task bar is moved, its Task document will be automatically updated to reflect any changes to the its start date, end date and assigned Resource(s).

  4. The ability to drag the end point of a Task bar in order to change the Task start date and/or end date OR to lengthen/shorten the Task duration. When an end point of a Task bar representing is dragged, its Task document will be automatically updated to reflect any changes to its start date and end date.

  5. Mouse over of a Task bar will display a tooltip showing the Task document's sumaryDescription field value.

  6. Clicking the "Now" button Icon-sc-roster-Now-button positions the gantt chart at the current date/time.

  7. Clicking the "Hour" button Icon-sc-roster-Hour-button sets the timeline scale to days, with each day divided into 24 one-hour cells.

  8. Clicking the "Day" button Icon-sc-roster-Day-button sets the timeline scale to months, with each month divided into its days.

  9. Clicking the "Week" button Icon-sc-roster-Week-button sets the timeline scale to months, with each month divided into its weeks.

  10. Clicking a Task bar opens the document for that Task.

  11. Clicking a Resource opens the document for that Resource.

The sc-roster definition provides fields for setting the properties of sc-roster gantt chart and is fully described below.

 

2 Definition

The sc-roster component is defined by a set of name/value pair fields consisting of:

  • Required system fields
  • Required customizable fields
  • Optional customizable fields

Note:

  1. Default values for fields described in the tables below are shown in bold text.

2.1 Required System Fields

Field Valid Values Description
componentName   sc-roster The component name.

Example:
"componentName": "sc-roster"

2.2 Required Customizable Fields

Field  Valid Values Description
assignmentField A "Task" document field name The name of a sc-related-document field in a Task document that is used to search for, select and save one of more Resource documents as a related documents to the Task document. Each related Resource document represents a Resource assigned to the Task.

Example:
"assignmentField": "rosterResource"
assignmentId Elastic Query An elastic query that returns the list of Resources to be displayed vertically down the left side of the gantt chart.

Example:
"assignmentId": "{'query':{'bool':{'must':[{'match':{'businessType':{'query':'Resource'}}},{'match':{'systemHeader.systemType':{'query':'document'}}}]}}}"
endDateField A Task document field name The name of the sc-date-time field in a Task document that stores the end date/time of a Task.

Example:
"endDateField": "expectedResolution"
filter An elastic query that returns the Tasks to be shown as Task bars below the timeline on the right side of the gantt chart.

Example:
"filter": "{'query':{'bool':{'must':[{'match':{'businessType':{'query':'Appointment'}}},{'match':{'systemHeader.systemType':{'query':'document'}}}]}}}"
name   Any value written in camel case.   Defines the name of the sc-roster field in the document and database.

Examples:
"name": "scRosterTypicalDefn"
"name": "Roster"
startDateField A "Task" document field name The name of the sc-date-time field in a Task document that stores the start date/time of a "Task".

Example:
"startDateField": "expectedResponse"

2.3 Optional Customizable Fields

Field Valid Values  Description
backgroundRefresh The sc-roster gantt chart field on a form will automatically refresh/reload when its refreshInterval field is defined with a value greater than zero, e.g. if "refreshInterval": 120 then a sc-roster gantt chart field on the form will automatically refresh/reload every 120 seconds

The backgroundRefresh field defines if the automatic refreshing/reloading of a sc-roster field on a form will or will not continue once the form is sent to the background in the browser.
true The automatic refreshing/reloading of a sc-roster gantt chart field on a form will continue once the form is sent to the background in the browser.

Example:
"backgroundRefresh": true
false Default value.
The automatic refreshing/reloading of a sc-roster gantt chart field on a form will not continue once the form is sent to the background in the browser.
defaultView Day Set the timeline scale to display months with each month divided into days.

Example:
"defaultView": "Hour"
Week Set the timeline scale to display months with each month divided into weeks.

Example:
"defaultView": "Week"
Hour Set the timeline scale to display days with each day divided into 24 one-hour cells.

Examples:
"defaultView": "Hour"
enabled false The "Now", "Hour", "Day" and "Week" buttons are disabled, greyed out and a Stop icon appears on mouse over.
Dragging and dropping of Task bars is disabled.
Grabbing and moving the end points of a Task bar is disabled.

Example:
"enabled": false
true Default value.
The "Now", "Hour", "Day" and "Week" buttons are not disabled, greyed out and a Stop icon does not appear on mouseover.
Dragging and dropping of Task bars is not disabled.
Grabbing and moving the end points of a Task bar is not disabled.
enableDragging false Disables the ability to drag and drop a Task bar horizontally to new timeline location and/or vertically from one Resource to another Resource.

Example:
"enableDragging": false
true Default value.
Enables the ability to drag and drop a Task bar horizontally to new timeline location and/or vertically from one Resource to another Resource.
When the Task bar is moved to a new timeline location, the Task document will be automatically updated to reflect any changes to the Task start date, end date and assigned Resource(s).
fullWidth true The sc-roster field displays full width on the form (recommended).

Example:
"fullWidth": true
false Default value.
The sc-roster field does not display full width on the form.
label Any value Defines the name of the sc-roster gantt chart field on the form i.e. the field label.

Examples:
"label": "sc-roster Typical Defn"
"label": "Roster"
Defaults to the sc-roster gantt field displays without a field label on the form.
maxHeight Integervalue The maximum height of the sc-roster gantt chart field.
If the number of resources results in the max height value being exceeded, then vertical scrolling or the sc-roster gantt chart field is automatically enabled.

Example:
"maxHeight": 200
300 Default value.
refreshInterval Integer value Sets the number of seconds to re-run the "filter" field's elastic query for an automatic reload/refresh of the sc-roster gantt chart.

Example:
"refreshInterval": 120
0 Default value.
No automatic reload/refresh of the sc-roster gantt chart occurs.
urlOpenIn newWindow Clicking on a Task bar or Resouce will open the Task/Resource document in a new browser window.

Example:
"urlOpenIn": "newWindow"
popup Clicking on a Task bar or Resouce will open the Task/Resource document in a in a browser pop-up.

Example:
"openIn": "popup"
currentWindow Default value.
Clicking on a Task bar or Resouce will open the Task/Resource document in a in the current window.

Example:
"urlOpenIn": "currentWindow"
viewType gantt Default value.
The sc-roster field displays as a gantt chart field on a form, showing a list of Resources down the right side and the Tasks assigned to each Resource as Task bars under a timeline on the right side.

Example:
"viewType": "gantt"
visible false The sc-roster gantt chart field is not visible on the form.

Example:
"visible": false
true Default value.
The sc-roster gantt chart is visible on the form.

  

3 Typical Definition

Below is a typical sc-roster component definition, defined with its required fields plus any optional field whose value is typically other than its default value.

        {
            "componentName": "sc-roster",
            "name": "scRosterTypicalDefinition",
            "assignmentField": "taskResource",
            "assignmentId": "{'query':{'bool':{'must':[{'match':{'businessType':{'query':'Resource'}}},{'match':{'systemHeader.systemType':{'query':'document'}}}]}}}",
            "defaultView": "Day",
            "enableDragging": true,
            "endDateField": "taskEndDate",
            "filter": "{'query':{'bool':{'must':[{'match':{'businessType':{'query':'Appointment'}}},{'match':{'systemHeader.systemType':{'query':'document'}}}]}}}",
            "fullWidth": true,
            "label": "sc-roster Typical Definition",
            "maxHeight": 200,
            "refreshInterval": 60,
            "startDateField": "taskStartDate",
            "urlOpenIn": "newWindow",
            "viewType": "gantt"
        }

One or more of the optional fields shown below can be included in the above definition should a value other than their default value be required.

            "backgroundRefresh": true,
            "enabled": false,
            "visible": false,

 

4 Examples

Example 1

sc-roster component defined with the typically needed fields.

        {
            "componentName": "sc-roster",
            "name": "scRosterTypicalDefinition",
            "assignmentField": "taskResource",
            "assignmentId": "{'query':{'bool':{'must':[{'match':{'businessType':{'query':'Resource'}}},{'match':{'systemHeader.systemType':{'query':'document'}}}]}}}",
            "defaultView": "Day",
            "enableDragging": true,
            "endDateField": "taskEndDate",
            "filter": "{'query':{'bool':{'must':[{'match':{'businessType':{'query':'Appointment'}}},{'match':{'systemHeader.systemType':{'query':'document'}}}]}}}",
            "fullWidth": true,
            "label": "sc-roster Typical Definition",
            "maxHeight": 200,
            "refreshInterval": 60,
            "startDateField": "taskStartDate",
            "urlOpenIn": "newWindow",
            "viewType": "gantt"
        }

Resulting sc-roster gantt chart field on the form:

sc-roster-field-Example-1-Image-1

Mouse over of a Task bar:

Example:

Mouse over the "Task 0003" Task bar will display a tooltip showing the Task document summaryDescription field value.

sc-roster-field-Example-1-Image-2

Clicking a Task bar:

Example:

Clicking the 'Task 0002" Task bar will opens a new window displaying the "Task 0002" document.

sc-roster-field-Example-1-Image-3

The "Task Resource(s)" field on the form is a sc-related-document field showing "Field Resource 007" and "Field Resource 008" are assigned to "Task 0002". "Task 0002" start date/time and end date/time values together with its 2 assigned Resources are used to position the two Task bars for "Task 0002" shown on the sc-roster gantt chart above.

Example:

Clicking the Task bar for "Task 0003" opens a new window displaying the "Task 0003" document.

sc-roster-field-Example-1-Image-4

The "Task 0003" start date/time and end date/time values together with its one assigned Resource are used to position the Task bar for "Task 0003" shown on the sc-roster gantt chart above.

Dragging a Task bar and/or grabbing and dragging either of its end points to a new location on the gantt chart:

Example:

Dragging the "Task 0003" Task bar from "Field Resource 003" to "Field Resource 001" and to a start date of 28 Jun 2023 and grabbing and dragging its end point to reduce its duration from 9 days to 5 days:

sc-roster-field-Example-1-Image-5

In addition to changing its position on the gantt chart, the "Task 003" document will be automatically updated to reflect changes to its start date/time, end date/time and assigned rsource(s).

sc-roster-field-Example-1-Image-6

Clicking a Resource listed on the right side of the gantt chart:

Example:

Clicking "Field Resource 008" opens a new window displaying the "Field Resource 008" document.

sc-roster-field-Example-1-Image-7