The Choice Timeline SA widget is used in task forms of the Task (task) table and its child tables. It shows when and for how long a particular task was in different states, determined by options of a specific choice column.
The widget consists of the following elements:
Total time spent in statuses – displays the total time spent in all non-excluded statuses.
The order of segments corresponds to the order in which state values changed. Also, the width of the segment corresponds to the time spent in a certain state relative to the total time.
When you move the pointer over a segment, a window appears, showing the state and the time spent in this state. If the time is less than 1 minute, <1m is displayed.
Below, the start and end times of this status are displayed. If the current status is the last segment, Now is displayed instead of the end time.
The Choice Timeline SA widget can be added to the Task table and tables extended from it. By default, the widget is not displayed on the form.
To display data on the time spent in different statuses, you need to add the widget to a form layout and configure the option schema.
To add the widget on a form, complete the following steps:
Click the widget name to set the schema options in the Schema options values field. Enter widget options in JSON format.
If you do not configure the option schema, the widget will have default settings:
|
Use the Widget Instance window to specify the widget options. Click the widget while configuring the layout to call this window.
In the window, fill in the Schema option values field. Enter the widget options in JSON format. If you leave the field empty, the default values will be applied.
Change the default title of the widget by defining the new one:
{ "title": "Title" } |
It is recommended to use a title created in the Source Message (source_message) table, so that it has translations. |
Define a column of the Choice type:
{ "column": "column_name" } |
If you need to use a color that is not included in the list of default colors for a particular choice option, specify it in the following way:
{ "colorMap": [ {"color": "#123456", "value": "choice_option.value" ] } |
{ "excludedStates": "choice_option.value" } |
The following screenshot illustrates the configured widget: |
{ "minHeight": "600px", "title": "Task", "column": "state", "colorMap": [ {"color": "#0086E5", "value":"1"}, {"color": "red", "value":"-1"} ], "excludedStates": ["-2","7"] } |
The widget is displayed only on the created records. The status change data is taken from the History (sys_history) table, the state data and state translations are taken from the Choice Options (sys_choice) table.
|