Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The Choice Timeline widget is used in task forms of the Task (task) and its child tables. It shows when and for how long a particular task was in different statuses, determined by options of a specific choice column.

Widget appearance 


The widget consists of the following elements:

  1. Title. 
  2. Legend – maps a specific color and status value. It displays only those statuses in which a record was.
    Image Modified
  3. Start date and time – displays the start time of the work on a task.
  4. Total time spent in statuses – displays the total time spent in all non-excluded status.

  5. End date and time – displays the time when the work on a task was completed. The task should be in inactive mode (Active = false).

The order of segments corresponds to the order in which status values changed. Also, the width of the segment corresponds to the time spent in a certain status relative to the total time.

When you hover over a segment, a window is displayed with the name of the status and the time spent in this status. 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.

Set up the widget


The Timeline widget can be added to the Task table and tables extended from it. By default, it 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 option schema.

Add a widget to a form layout


To add the widget on formsa form, complete the following steps:

  1. Navigate to any table record you need to add the widget.
  2. In the hamburger menu, select Configure Form → Layout.
  3. Move the Timeline widget from the Available box to the Selected box.
    • You can configure the option schema to override default widget settings. Learn how to do it below.Click on the widget name to set the schema options in the Schema Options Values field. Enter widget options in JSON format.

  4. Click Save to apply the changes.
Info

If you do not configure the option schema, the widget will have default settings:

  1. Widget title = Timeline.
  2. Choice column = State.
  3. Color = Default set of 21 colors. When all 21 colors are used in a widget, subsequent colors are randomly generated.

Configure the options schema


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.

  1. Change the default title of the widget by defining the new one: 

    Code Block
    {
    
         "title": "Title"
    
    }


    Tip

    It is better to use a title created in the Source Message (source_message) table, so that it has translations. 


  2. Define a column of the Choice type:

    Code Block
    {
    
         "column": "column_name"
    
    }


  3. 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:

    Code Block
    {
    
         "colorMap": [
                    {"color": "#123456", "value": "choice_option.value"
    
    }


  4. Exclude some statuses not to display in the widget. Excluded statuses are displayed in gray. They occupy the minimum width and are not taken into account in the total time:

    Code Block
    {
    
         "excludedStates": "choice_option.value"
    
    }


Panel
titleWidget option values example:


Code Block
languagejs
titleJSON Example
{
    "title": "Task",
    "column": "state",
    "colorMap": [
        { "color": "#000000", "value": "1" },
        { "color": "red", "value": "-1" }
    ],
    "excludedStates": ["-2", "7"]
}

The following screenshot below illustrates the configured widget:


Additional information


The widget will be is displayed only on the created records. The status change data is taken from the History (sys_history)table, the status state data and status state translations are taken from the Choice Options (sys_choice) table. 

Info
  • If there are option values in the History (sys_history) that are not in the option set for the current child of the Task table, the widget looks for a suitable one in sets matching set of the nearest parent of this table (if there is any).
  • If there is no status is state in the Choice Options (sys_choice) for the current table, the widget accesses the parent table statusstates.
  • If there are no translations or the status state itself, a value of the status state from sys_history is displayed.


 

Table of Contents
absoluteUrltrue
classfixedPosition
printablefalse