Lesson 4 Controlling value stream data#

Track value stream dots as they change status or state.

Before you begin

Before you begin this lesson, make sure that you complete the previous lesson.

About this task

In the last lesson, you defined the following DQL query for the Merged stage:

{
          "name": "Merged",
          "query": "(pr.status=MERGED or pr.status=closed) AND build.status!=success AND deployment.env!=DEV and deployment.env!=PROD ",
          "description": null,
          "wipLimit": null,
          "gates": null
        },

Pull requests from the Git project that satisfy the query has dots displayed in the value stream stage Merged. In this lesson, you create pull requests in the tutorial Git project, and test the value stream with several queries.

Procedure

To modify the tutorial value stream, complete the following steps:

  1. In your tutorial Git repository, create a pull request.

    The value stream is now configured to display pull requests in the tutorial Git repository.

  2. On the Value Streams page, select the tutorial value stream.

  3. Click Configure value stream map > Download value stream map.

    The helloWorld-vsm.json file is downloaded to your computer.

    Note: If you have the helloWorld-vsm.json used in the previous lesson, you can use that.

  4. In your text editor, open the helloWorld-vsm.json file, and then add a DQL query to the Selected for Development stage in the JSON file.

    The following DQL query limits the Selected for Development stage to Jira issues with the workflow status of Selected for Development:

    ```

     "phases": [
        {
          "name": "PLAN",
          "description": "",
          "stages": [
            {
              "name": "Backlog",
              "query": "issue.status=\"Backlog\"",
              "description": "",
              "wipLimit": null,
              "gates": null
            },
            {
              "name": "Selected for Development",
              "query": "issue.status=\"Selected for Development\"",
              "description": "",
              "wipLimit": null,
              "gates": null
            }
          ]
        },
    

    ```

  5. Save the helloWorld-vsm.json file.

  6. On the helloWorld value stream page, select Configure value stream map > Replace value stream map, and then select the JSON file that you modified.

  7. Refresh the helloWorld page.

    After the page refreshes, the dot representing the Jira issue moves from the Backlog stage to the Selected for Development stage, as shown in the following figure:

    If your Jira project has more than one issue with the status of Selected for development, all of them appear in the Selected for development stage.

Results

In this lesson, you learned how to manage dot status changes.

What to do next

In later tutorials, you will learn how to integrate other popular tools into your value streams, such as Git, Rally, and HCL™ Launch.

You can use other DQL queries to filter stages. If you apply labels to Jira issues, for example, you can use the labels DQL property. If you define the following query for a stage, "query": "issue.labels='asset'", then only Jira issues with the asset label appear in the stage. You can attach DQL queries to phases and stages in the value stream JSON file. Additionally, you can use the value stream Query bar to define DQL queries that further refine data filters.

Parent topic: Linking value stream tools