Hi,
I need to create a measure what counts issues which have merged pull request (Bitbucket) to certain repositories. Can someone point me to the right path?
Currently i’m able to count issues with merged pull requests, but can’t figure out how to get the number based on repository.
Br,
Toomas
Hi @toomastahe ,
Information about repositories are in several dimensions as one of the hierarchy levels to group data. For example, is in the Pull Request dimension, all data is grouped by Project → Repository → Pull request. You can use this in the report to filter data or in the calculations.
Unfortunately, there is no out-of-the-box measure representing the issue coutn with the pull request. You can define a new calculated measure (in Measures) to count issues with merged pull requests:
NonZero(Count(
Filter(
--set of all issues
DescendantsSet([Issue].CurrentHierarchyMember,[Issue].[Issue]),
--check if issue has related pull request
[Measures].[Pull requests merged] > 0
)
))
You can also specify the repository name in the calculation
NonZero(Count(
Filter(
--set of all issues
DescendantsSet([Issue].CurrentHierarchyMember,[Issue].[Issue]),
--check if issue has related repository
([Measures].[Pull requests merged],
[Pull Request].[Specific Project].[Specific Repository]) > 0
)
))
Replace “Specific Project” and “Specific Repository” with the name of your target project and repository.
more details on calcauted measure are here: Calculated measures
Best,
Zane / support@eazyBI.com
Thank you @zane.baranovska
I was so close, but did not see this simple solution 