@@ -1084,6 +1084,7 @@ class GroupIssueManager(ListMixin, RESTManager):
1084
1084
"state" ,
1085
1085
"labels" ,
1086
1086
"milestone" ,
1087
+ "iteration" ,
1087
1088
"order_by" ,
1088
1089
"sort" ,
1089
1090
"iids" ,
@@ -1296,6 +1297,40 @@ class GroupMilestoneManager(CRUDMixin, RESTManager):
1296
1297
_list_filters = ("iids" , "state" , "search" )
1297
1298
1298
1299
1300
+ class GroupIteration (SaveMixin , ObjectDeleteMixin , RESTObject ):
1301
+ _short_print_attr = "title"
1302
+
1303
+ @cli .register_custom_action ("GroupIteration" )
1304
+ @exc .on_http_error (exc .GitlabListError )
1305
+ def issues (self , ** kwargs ):
1306
+ """List issues related to this Iteration.
1307
+
1308
+ Args:
1309
+ **kwargs: Extra options to send to the server (e.g. sudo)
1310
+
1311
+ Raises:
1312
+ GitlabAuthenticationError: If authentication is not correct
1313
+ GitlabListError: If the list could not be retrieved
1314
+
1315
+ Returns:
1316
+ The list of issues
1317
+ """
1318
+ manager = GroupIssueManager (self .manager .gitlab , parent = self .manager ._parent )
1319
+ return manager .list (iteration_id = self .get_id (), ** kwargs )
1320
+
1321
+
1322
+ class GroupIterationManager (CRUDMixin , RESTManager ):
1323
+ _path = "/groups/%(group_id)s/iterations"
1324
+ _obj_cls = GroupIteration
1325
+ _from_parent_attrs = {"group_id" : "id" }
1326
+ _create_attrs = (("title" ,), ("description" , "due_date" , "start_date" ))
1327
+ _update_attrs = (
1328
+ tuple (),
1329
+ ("title" , "description" , "due_date" , "start_date" , "state" ),
1330
+ )
1331
+ _list_filters = ("iids" , "state" , "search" )
1332
+
1333
+
1299
1334
class GroupNotificationSettings (NotificationSettings ):
1300
1335
pass
1301
1336
@@ -1396,6 +1431,7 @@ class Group(SaveMixin, ObjectDeleteMixin, RESTObject):
1396
1431
("members" , "GroupMemberManager" ),
1397
1432
("mergerequests" , "GroupMergeRequestManager" ),
1398
1433
("milestones" , "GroupMilestoneManager" ),
1434
+ ("iterations" , "GroupIterationManager" ),
1399
1435
("notificationsettings" , "GroupNotificationSettingsManager" ),
1400
1436
("packages" , "GroupPackageManager" ),
1401
1437
("projects" , "GroupProjectManager" ),
@@ -1648,6 +1684,7 @@ class IssueManager(ListMixin, RESTManager):
1648
1684
"state" ,
1649
1685
"labels" ,
1650
1686
"milestone" ,
1687
+ "iteration" ,
1651
1688
"scope" ,
1652
1689
"author_id" ,
1653
1690
"assignee_id" ,
@@ -2781,6 +2818,7 @@ class ProjectIssueManager(CRUDMixin, RESTManager):
2781
2818
"state" ,
2782
2819
"labels" ,
2783
2820
"milestone" ,
2821
+ "iteration" ,
2784
2822
"scope" ,
2785
2823
"author_id" ,
2786
2824
"assignee_id" ,
@@ -2801,6 +2839,7 @@ class ProjectIssueManager(CRUDMixin, RESTManager):
2801
2839
"assignee_ids" ,
2802
2840
"assignee_id" ,
2803
2841
"milestone_id" ,
2842
+ "iteration_id" ,
2804
2843
"labels" ,
2805
2844
"created_at" ,
2806
2845
"due_date" ,
@@ -2817,6 +2856,7 @@ class ProjectIssueManager(CRUDMixin, RESTManager):
2817
2856
"assignee_ids" ,
2818
2857
"assignee_id" ,
2819
2858
"milestone_id" ,
2859
+ "iteration_id" ,
2820
2860
"labels" ,
2821
2861
"state_event" ,
2822
2862
"updated_at" ,
@@ -3576,6 +3616,45 @@ class ProjectMilestoneManager(CRUDMixin, RESTManager):
3576
3616
_list_filters = ("iids" , "state" , "search" )
3577
3617
3578
3618
3619
+ class ProjectIteration (SaveMixin , ObjectDeleteMixin , RESTObject ):
3620
+ _short_print_attr = "title"
3621
+
3622
+ @cli .register_custom_action ("ProjectIteration" )
3623
+ @exc .on_http_error (exc .GitlabListError )
3624
+ def issues (self , ** kwargs ):
3625
+ """List issues related to this milestone.
3626
+
3627
+ Args:
3628
+ **kwargs: Extra options to send to the server (e.g. sudo)
3629
+
3630
+ Raises:
3631
+ GitlabAuthenticationError: If authentication is not correct
3632
+ GitlabListError: If the list could not be retrieved
3633
+
3634
+ Returns:
3635
+ The list of issues
3636
+ """
3637
+
3638
+ manager = ProjectIssueManager (self .manager .gitlab , parent = self .manager ._parent )
3639
+
3640
+ return manager .list (iteration_id = self .get_id (), ** kwargs )
3641
+
3642
+
3643
+ class ProjectIterationManager (CRUDMixin , RESTManager ):
3644
+ _path = "/projects/%(project_id)s/iterations"
3645
+ _obj_cls = ProjectIteration
3646
+ _from_parent_attrs = {"project_id" : "id" }
3647
+ _create_attrs = (
3648
+ ("title" ,),
3649
+ ("description" , "due_date" , "start_date" , "state" ),
3650
+ )
3651
+ _update_attrs = (
3652
+ tuple (),
3653
+ ("title" , "description" , "due_date" , "start_date" , "state" ),
3654
+ )
3655
+ _list_filters = ("iids" , "state" , "search" )
3656
+
3657
+
3579
3658
class ProjectLabel (SubscribableMixin , SaveMixin , ObjectDeleteMixin , RESTObject ):
3580
3659
_id_attr = "name"
3581
3660
@@ -4690,6 +4769,7 @@ class Project(SaveMixin, ObjectDeleteMixin, RESTObject):
4690
4769
("members" , "ProjectMemberManager" ),
4691
4770
("mergerequests" , "ProjectMergeRequestManager" ),
4692
4771
("milestones" , "ProjectMilestoneManager" ),
4772
+ ("iterations" , "ProjectIterationManager" ),
4693
4773
("notes" , "ProjectNoteManager" ),
4694
4774
("notificationsettings" , "ProjectNotificationSettingsManager" ),
4695
4775
("packages" , "ProjectPackageManager" ),
0 commit comments