| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent f731707 commit fe7d19d
5 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -236,40 +236,44 @@ Reference | |||
| 236 | 236 | ||
| 237 | 237 | + :class:`gitlab.v4.objects.IssuesStatistics` | |
| 238 | 238 | + :class:`gitlab.v4.objects.IssuesStatisticsManager` | |
| 239 | - + :attr:`gitlab.issuesstatistics` | ||
| 239 | + + :attr:`gitlab.issues_statistics` | ||
| 240 | 240 | + :class:`gitlab.v4.objects.GroupIssuesStatistics` | |
| 241 | 241 | + :class:`gitlab.v4.objects.GroupIssuesStatisticsManager` | |
| 242 | - + :attr:`gitlab.v4.objects.Group.issuesstatistics` | ||
| 242 | + + :attr:`gitlab.v4.objects.Group.issues_statistics` | ||
| 243 | 243 | + :class:`gitlab.v4.objects.ProjectIssuesStatistics` | |
| 244 | 244 | + :class:`gitlab.v4.objects.ProjectIssuesStatisticsManager` | |
| 245 | - + :attr:`gitlab.v4.objects.Project.issuesstatistics` | ||
| 245 | + + :attr:`gitlab.v4.objects.Project.issues_statistics` | ||
| 246 | 246 | ||
| 247 | 247 | ||
| 248 | 248 | * GitLab API: https://docs.gitlab.com/ce/api/issues_statistics.htm | |
| 249 | 249 | ||
| 250 | 250 | Examples | |
| 251 | 251 | --------- | |
| 252 | 252 | ||
| 253 | + Get statistics of all issues created by the current user:: | ||
| 254 | + | ||
| 255 | + statistics = gl.issues_statistics.get() | ||
| 256 | + | ||
| 253 | 257 | Get statistics of all issues the user has access to:: | |
| 254 | 258 | ||
| 255 | - statistics = gl.issuesstatistics.get() | ||
| 259 | + statistics = gl.issues_statistics.get(scope='all') | ||
| 256 | 260 | ||
| 257 | - Get statistics of issues for the user with ``foobar`` in ``title`` and ``description``:: | ||
| 261 | + Get statistics of issues for the user with ``foobar`` in the ``title`` or the ``description``:: | ||
| 258 | 262 | ||
| 259 | - statistics = gl.issuesstatistics.get(search='foobar') | ||
| 263 | + statistics = gl.issues_statistics.get(search='foobar') | ||
| 260 | 264 | ||
| 261 | 265 | Get statistics of all issues in a group:: | |
| 262 | 266 | ||
| 263 | - statistics = group.issuesstatistics.get() | ||
| 267 | + statistics = group.issues_statistics.get() | ||
| 264 | 268 | ||
| 265 | - Get statistics of issues in a group with ``foobar`` in ``title`` and ``description``:: | ||
| 269 | + Get statistics of issues in a group with ``foobar`` in the ``title`` or the ``description``:: | ||
| 266 | 270 | ||
| 267 | - statistics = group.issuesstatistics.get(search='foobar') | ||
| 271 | + statistics = group.issues_statistics.get(search='foobar') | ||
| 268 | 272 | ||
| 269 | 273 | Get statistics of all issues in a project:: | |
| 270 | 274 | ||
| 271 | - statistics = project.issuesstatistics.get() | ||
| 275 | + statistics = project.issues_statistics.get() | ||
| 272 | 276 | ||
| 273 | - Get statistics of issues in a project with ``foobar`` in ``title`` and ``description``:: | ||
| 277 | + Get statistics of issues in a project with ``foobar`` in the ``title`` or the ``description``:: | ||
| 274 | 278 | ||
| 275 | - statistics = project.issuesstatistics.get(search='foobar') | ||
| 279 | + statistics = project.issues_statistics.get(search='foobar') | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -118,7 +118,7 @@ def __init__( | |||
| 118 | 118 | self.groups = objects.GroupManager(self) | |
| 119 | 119 | self.hooks = objects.HookManager(self) | |
| 120 | 120 | self.issues = objects.IssueManager(self) | |
| 121 | - self.issuesstatistics = objects.IssuesStatisticsManager(self) | ||
| 121 | + self.issues_statistics = objects.IssuesStatisticsManager(self) | ||
| 122 | 122 | self.ldapgroups = objects.LDAPGroupManager(self) | |
| 123 | 123 | self.licenses = objects.LicenseManager(self) | |
| 124 | 124 | self.namespaces = objects.NamespaceManager(self) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -53,7 +53,7 @@ class Group(SaveMixin, ObjectDeleteMixin, RESTObject): | |||
| 53 | 53 | ("epics", "GroupEpicManager"), | |
| 54 | 54 | ("imports", "GroupImportManager"), | |
| 55 | 55 | ("issues", "GroupIssueManager"), | |
| 56 | - ("issuesstatistics", "GroupIssuesStatisticsManager"), | ||
| 56 | + ("issues_statistics", "GroupIssuesStatisticsManager"), | ||
| 57 | 57 | ("labels", "GroupLabelManager"), | |
| 58 | 58 | ("members", "GroupMemberManager"), | |
| 59 | 59 | ("members_all", "GroupMemberAllManager"), | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -155,7 +155,8 @@ class Project(RefreshMixin, SaveMixin, ObjectDeleteMixin, RepositoryMixin, RESTO | |||
| 155 | 155 | ("wikis", "ProjectWikiManager"), | |
| 156 | 156 | ("clusters", "ProjectClusterManager"), | |
| 157 | 157 | ("additionalstatistics", "ProjectAdditionalStatisticsManager"), | |
| 158 | - ("issuesstatistics", "ProjectIssuesStatisticsManager"), | ||
| 158 | + ("issues_statistics", "ProjectIssuesStatisticsManager"), | ||
| 159 | + ("issuesstatistics", "ProjectIssuesStatisticsManager"), # Deprecated | ||
| 159 | 160 | ("deploytokens", "ProjectDeployTokenManager"), | |
| 160 | 161 | ) | |
| 161 | 162 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -71,18 +71,22 @@ def test_get_issue(gl, resp_get_issue): | |||
| 71 | 71 | ||
| 72 | 72 | ||
| 73 | 73 | def test_get_issues_statistics(gl, resp_issue_statistics): | |
| 74 | - statistics = gl.issuesstatistics.get() | ||
| 74 | + statistics = gl.issues_statistics.get() | ||
| 75 | 75 | assert isinstance(statistics, IssuesStatistics) | |
| 76 | 76 | assert statistics.statistics["counts"]["all"] == 20 | |
| 77 | 77 | ||
| 78 | 78 | ||
| 79 | 79 | def test_get_group_issues_statistics(group, resp_issue_statistics): | |
| 80 | - statistics = group.issuesstatistics.get() | ||
| 80 | + statistics = group.issues_statistics.get() | ||
| 81 | 81 | assert isinstance(statistics, GroupIssuesStatistics) | |
| 82 | 82 | assert statistics.statistics["counts"]["all"] == 20 | |
| 83 | 83 | ||
| 84 | 84 | ||
| 85 | 85 | def test_get_project_issues_statistics(project, resp_issue_statistics): | |
| 86 | - statistics = project.issuesstatistics.get() | ||
| 86 | + statistics = project.issues_statistics.get() | ||
| 87 | 87 | assert isinstance(statistics, ProjectIssuesStatistics) | |
| 88 | 88 | assert statistics.statistics["counts"]["all"] == 20 | |
| 89 | + | ||
| 90 | + # Deprecated attribute | ||
| 91 | + deprecated = project.issuesstatistics.get() | ||
| 92 | + assert deprecated.statistics == statistics.statistics | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments