Defining actions in views

Engineering Insights enables view authors to create dynamic views by defining actions. Actions enable users to load data dynamically within the views in the following ways:
  • Opening an existing view from the current view.
  • Reloading the container in a view based on a defined parameter.
  • Reloading the connections in a view.
To create dynamic views, you must complete the following tasks:

Creating an action to open one view from another view

About this task

In this section, you create an action to pass parameters and open an existing view from the current view.

Procedure

  1. Open the view and click the edit icon Edit view icon.
  2. In the edit mode of the view, select a node in the container.
  3. Right-click the node and click Edit Node.
  4. In the Nodes window, go to the Actions tab, and then click Add.
  5. To define the action for opening a view, complete the following steps on the Add Actions page:
    1. In the Action Label field, enter a name for the action.
    2. From the Action Type list, select Command.
    3. From the Command list, select openView.
    4. Click Select to open the Select a view dialog box.
    5. From the list of existing views, select the view that must open and then click OK.
      The table of parameters maps the parameters to the container in the selected view. Based on the type of the container, the list of parameters is shown in three sections:
      • Artifacts
      • Custom Artifacts
      • View Parameters
    6. To change the parameter value of the selected view, use any of the following options:
      • In the Parameter Value field, you can enter the required value.
      • To apply the value of source parameter simultaneously to all selected parameters irrespective of their types, select Apply value to all selected.
      • To apply the value of source parameter simultaneously to only selected parameters that are of the same type as the source parameter, select Apply value to all selected of same type.
  6. From the Target list, select New Window or Current Window, and then click OK.
    • If you select New Window, the node from which the action is triggered gets highlighted and the selected view opens in a new window.
    • If you select Current Window, the selected view opens in place of the existing view.
  7. To save the actions in the view, click Save.

Results

When you right-click the node and click Open_multicontainer_view, the selected view opens.

Creating an action to reload the container

About this task

In this section, you create an action to reload the Work Item container with artifacts that contain the text 'Mobile devices' in the title.

Procedure

  1. Open the view and click the edit icon Edit view icon.
  2. In the edit mode of the view, select a node in the container.
  3. In the Nodes window, go to the Actions tab, and then click Add.
  4. To reload the container, complete the following substeps on the Add Action dialog box:
    1. In the Action Label field, enter a name for the action.
    2. From the Action Type list, select Command.
    3. From the Command list, select ReloadContainer.
    4. In the Parameter Value field, enter a filter value. For example, mobile devices.
    5. To set this action as the default action, select the Default Action checkbox.
    6. Click OK.

Results

When you click Load mobile devices, the Work Item container is reloaded with artifacts that have 'mobile devices' in the title.

Creating an action to reload the connections

About this task

In this section, you create an action to reload the connections in the Work Item container.

Procedure

  1. Open the view and click the edit icon Edit view icon.
  2. In the edit mode of the view, select a node in the container.
  3. In the Nodes window, go to the Actions tab, and then click Add.
  4. To reload the connections in the container, complete the following substeps on the Add Action dialog box:
    1. In the Action Label field, enter a name for the action.
    2. From the Action Type list, select Command.
    3. From the Command list, select ReloadConnection.
    4. In the connectionIds field, select the connection IDs that must be reloaded. For example, TaskToTask.
    5. In the params field, select the array of parameters to pass to the connections.
    6. To clear and reload the current connections, select Clear.
    7. Click OK.

Results

When you click Show Parent, the connections between the container are reloaded. If the Clear checkbox is selected, then the existing connections are removed and again reloaded.

Triggering actions in views

In the view mode, you can trigger or start any action that is defined by the view author.

Procedure

  1. Select any node in the container.
  2. To start the default action, double-click any node. The action that is set as the default action is triggered.
  3. To start a specific action, click the actions icon Action button. A list of defined actions is displayed.
  4. Click the required action.

Results

Based on the selected action, the view changes.
  • If you click Open_multicontainer_view, the selected view opens.
  • If you click Load_container, the container is reloaded with artifacts that satisfy the specified condition.
  • If you click Show Parent or Show Children, the connections that are specified in the selected action are reloaded.