Page MenuHomePhabricator

As a Bitergia user, I'd like to access Phabricator board column statistics, so I can know where my team's tickets are being stalled
Open, LowestPublicFeature

Description

My Team's Phabricator board, "Design-Systems-Sprint" (see here) , is organized into the following columns: "Committed", "Research", "Ready for Design", "In Design", "Design Review", "Ready for Development", "In Development", "Code Review", "Design Sign-Off", "Functional Testing", "Product Sign-Off", "Pending Release".

I would like to be able to query statistics about these columns via the Bitergia dashboards, so as to understand where there are backups or slowdowns, how long issues stay in each column, how many issues are present in each column, etc.

If using the Phabricator API, I can do this with:

$ echo '{
  "queryKey": "open",
  "constraints": {
    "projects": [
      "PHID-PROJ-7x2jagmev5l5dyco323o"
    ]
  },
  "attachments": {
    "columns": "true",
    "projects": "true"
  }
}' | arc call-conduit --conduit-uri https://phabricator.wikimedia.org/ --conduit-token $CONDUIT_TOKEN -- maniphest.search | jq '.response.data[].attachments.columns.boards."PHID-PROJ-7x2jagmev5l5dyco323o".columns[].name'

The result is something like:

"Design Sign-Off"
"Code Review"
"Committed"
"Code Review"
"Product Sign-Off"
"Committed"
"Research"
"Committed"
...

That is to say, call maniphest.search specifying {"attachments": {"columns": "true", "projects": "true"}}, then retrieve the contents of attachments.columns.boards, and finally get the value associated with the key of the project you query, in this case "PHID-PROJ-7x2jagmev5l5dyco323o".

Note that these are distinct from "statuses" (which you can get with maniphest.status.search, as in

echo '{}' | arc call-conduit --conduit-uri https://phabricator.wikimedia.org/ --conduit-token $CONDUIT_TOKEN -- maniphest.status.search

these are more granular and vary per board.

To get the full set of columns for a given project, you can do

echo '{
  "constraints": {
    "projects": [
      "PHID-PROJ-7x2jagmev5l5dyco323o"
    ]
  }
}' | arc call-conduit --conduit-uri https://phabricator.wikimedia.org/ --conduit-token $CONDUIT_TOKEN -- project.column.search | jq '.response.data[].fields.name'

which yields a result such as :

"Functional Testing"
"Pending Release"
"Product Sign-Off"
"Design Sign-Off"
"Code Review"
"In Development"
"Ready for Development"
"Design Review"
"In Design"
"Ready for Design"
"Research"
"Committed"

I have a custom script which queries for these, but I can't current integrate this into the Bitergia dashboard. I would love to have this ability, so as to integrate with other dashboards and visualizations. I'd imagine there are many other projects here that would benefit from this capability!

(I should note that I do not see the ability to query attachments.projects in the current set of available properties - let me know if this is indeed present somewhere / possible to query!)

Event Timeline

NBaca-WMF updated the task description. (Show Details)
NBaca-WMF updated the task description. (Show Details)
Aklapper triaged this task as Lowest priority.Jun 26 2022, 5:04 PM
Aklapper changed the subtype of this task from "Task" to "Feature Request".
Aklapper added a project: Upstream.

Hi @NHillard-WMF, thanks for taking the time to share this!
There is not much upstream work going on in the Phabricator indexing backend code. My impression is that it's quite rudimentary (e.g. not indexing any task comments, but only task creation). I'd expect any workboard changes indexing very unlikely to happen unless someone contributes such code in upstream.

Regarding the Wikimedia Phabricator instance specifically, you may want to talk to Release Engineering / Release-Engineering-Team about their latest Data³ exploration into Phabricator Metrics, and https://phabricator.wikimedia.org/project/reports/5859/ which also is related to that RelEng exploration.

Thanks for the reference, @Aklapper ! I briefly looked into how to update this upstream, and I might be able to do it, but I want to make sure I've got a handle on existing similar efforts at WMF.

This dashboard is very interesting! I had briefly come across it before, but didn't realize RelEng created it. I can follow up with them about this further, thank you for the reference.