Support multiple columns marked as done

NOTE

Support multiple columns marked as done, these multiple columns need to be the last few columns in the board.

  • Request

    {
      "type": "Jira",
      "boardId": 2,
      "projectKey": "ADM",
      "site": "dorametrics",
      "token": "xxx",
      "startTime": 1684771200000,
      "endTime": 1685030399999
    }
    
  • Response

    {
      "users": ["Guoqing Li", "Xinyi Xing"],
      "targetFields": [
        {
          "key": "issuetype",
          "name": "Issue Type",
          "flag": false
        }
      ],
      "jiraColumns": [
        {
          "key": "To Do",
          "value": {
            "name": "TODO",
            "statuses": ["TODO"]
          }
        },
        {
          "key": "In Progress",
          "value": {
            "name": "Doing",
            "statuses": ["DOING"]
          }
        },
        {
          "key": "In Progress",
          "value": {
            "name": "Blocked",
            "statuses": ["BLOCKED"]
          }
        },
        {
          "key": "In Progress",
          "value": {
            "name": "Review",
            "statuses": ["REVIEW"]
          }
        },
        {
          "key": "In Progress",
          "value": {
            "name": "Testing",
            "statuses": ["TESTING"]
          }
        },
        {
          "key": "done",
          "value": {
            "name": "Done",
            "statuses": ["DONE"]
          }
        }
      ]
    }
    
    • users: Only consider the users who has been assigned to the done cards.

    • If there are no done cards within the selected date range, the response will be empty. And you will not be able to proceed to the next page.

Result

Unable to confirm which column the user wants to mark as done. So cannot filter out only the done card during verfiy, otherwise the Crew Setting will be incomplete.

  • Only include users assigned to the done cards.
  • Now only support mark one column as done.

  • If the limitation of only supporting one column marked as done is removed, the Real Done component will display the status of all columns that marked as done. Report request can be sent to generate a report successfully.

  • Report request

    {
      "token": "",
      "type": "jira",
      "site": "dorametrics",
      "projectKey": "ADM",
      "boardId": "2",
      "boardColumns": [
        {
          "name": "TODO",
          "value": "To do"
        },
        {
          "name": "Doing",
          "value": "In Dev"
        },
        {
          "name": "Blocked",
          "value": "Block"
        },
        {
          "name": "Review",
          "value": "Review"
        },
        {
          "name": "Testing",
          "value": "Done"
        },
        {
          "name": "Done",
          "value": "Done"
        }
      ],
      "treatFlagCardAsBlock": true,
      "users": ["Guoqing Li", "Xinyi Xing"],
      "targetFields": [
        {
          "key": "issuetype",
          "name": "Issue Type",
          "flag": true
        },
        {
          "key": "parent",
          "name": "Parent",
          "flag": true
        }
      ],
      "doneColumn": ["DONE", "TESTING"]
    }
    
  • Now, if multiple columns are marked as done, the component will be hidden and cannot go to the next page.

NOTE

If the response result of verify is empty, go directly to the Metrics page, the component rendering will fail.

  • According to the doneColumn parameter in the request, will return cards marked as done. In getAllDoneCards method.
  • When processing original cards, it is re-filtered, and only the cards whose status is done are filtered out. In getMatchedCards() method.
  • Throughput(Cards Count) only include done cards whose latest history status is done or closed, whatever user mark which column as done.
public class CycleTimeInfo {

    private String column;

    private Double day;

}
  • First, calculate days of each column. When calculate Average cycle time and Total cycle time, remove To do, Analysis, Done column days.
  • Mark other column as done, will not calculate this column days in board CSV.

  • Mark testing column as testing, will calculate Total testing time / Total cycle time in board CSV. But mark testing column as done, will not calculate that in board CSV.

  • The calculation logic will not be affected by multi-done columns.

Support deduplication of Done cards

Section titled Support deduplication of Done cards
  • We need to exclude the cards with a status of DONE on the startDate at the very begining of our calculation.
  • The way to achieve:
    • Use jira card history