Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Merged branch "DOC0001218" into parent

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 statesdifferent states, determined by options of a specific choice column.

Widget appearance 

Image Modified

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.
  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 statusstatuses.

  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 state values changed. Also, the width of the segment corresponds to the time spent in a certain state relative to the total time.

Image Modified

When you hover 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.

Set up the widget

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

Add a widget to a form layout


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

  1. Navigate to any table record you need to add the widget.
  2. In the hamburger burger menu Image Added, select Configure Form → Layout.
  3. Move the Choice Timeline  SAwidget from the Available box to the Selected box.
    • Click on the widget name to set the schema options in the Schema Options Values 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 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 recommended to use a title created in the 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 illustrates the configured widget:

    Image Modified

  5. You can set the minimal height of the widget in pixels. Notably, the minimal height cannot be less than the height of displayed elements.
    To set the minimal height, complete the following steps: 
    1. Navigate to a table record showing the widget.
    2. In the burger menu, select Configure Form → Layout.
    3. In the Selected box, click the widget name to open the Widget instance window.
    4. In the Schema option values field, set the minimal height of the widget using the minHeight property as shown below.
      Code Block
      themeEclipse
      titleSchema option values
      {
          "minHeight": "600px",
          "title": "Task",
          "column": "state",
          "colorMap": [
              {"color": "#0086E5", "value":"1"},
              {"color": "red", "value":"-1"}
          ],
          "excludedStates": ["-2","7"]
      }
    5. Click Save to apply the changes.

Additional information


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. 

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 matching set of the nearest parent of this table (if there is any).
  • If there is no state in the Choice Options (sys_choice) for the current table, the widget accesses the parent table states.
  • If there are no translations or the state itself, a value of the state from History (sys_history) is displayed.


 

Table of Contents
absoluteUrltrue
classfixedPosition
printablefalse