@@ -5322,6 +5322,7 @@ def update_sprint(
5322
5322
startDate : Any | None = None ,
5323
5323
endDate : Any | None = None ,
5324
5324
state : str | None = None ,
5325
+ goal : str | None = None ,
5325
5326
) -> dict [str , Any ]:
5326
5327
"""Updates the sprint with the given values.
5327
5328
@@ -5330,7 +5331,8 @@ def update_sprint(
5330
5331
name (Optional[str]): The name to update your sprint to
5331
5332
startDate (Optional[Any]): The start date for the sprint
5332
5333
endDate (Optional[Any]): The start date for the sprint
5333
- state: (Optional[str]): The start date for the sprint
5334
+ state: (Optional[str]): The state of the sprint
5335
+ goal: (Optional[str]): The goal of the sprint
5334
5336
5335
5337
Returns:
5336
5338
Dict[str, Any]
@@ -5344,6 +5346,8 @@ def update_sprint(
5344
5346
payload ["endDate" ] = endDate
5345
5347
if state :
5346
5348
payload ["state" ] = state
5349
+ if goal :
5350
+ payload ["goal" ] = goal
5347
5351
5348
5352
url = self ._get_url (f"sprint/{ id } " , base = self .AGILE_BASE_URL )
5349
5353
r = self ._session .put (url , data = json .dumps (payload ))
@@ -5473,6 +5477,7 @@ def create_sprint(
5473
5477
board_id : int ,
5474
5478
startDate : Any | None = None ,
5475
5479
endDate : Any | None = None ,
5480
+ goal : str | None = None ,
5476
5481
) -> Sprint :
5477
5482
"""Create a new sprint for the ``board_id``.
5478
5483
@@ -5481,6 +5486,7 @@ def create_sprint(
5481
5486
board_id (int): Which board the sprint should be assigned.
5482
5487
startDate (Optional[Any]): Start date for the sprint.
5483
5488
endDate (Optional[Any]): End date for the sprint.
5489
+ goal (Optional[str]): Goal for the sprint.
5484
5490
5485
5491
Returns:
5486
5492
Sprint: The newly created Sprint
@@ -5490,14 +5496,16 @@ def create_sprint(
5490
5496
payload ["startDate" ] = startDate
5491
5497
if endDate :
5492
5498
payload ["endDate" ] = endDate
5499
+ if goal :
5500
+ payload ["goal" ] = goal
5493
5501
5494
- raw_issue_json : dict [str , Any ]
5502
+ raw_sprint_json : dict [str , Any ]
5495
5503
url = self ._get_url ("sprint" , base = self .AGILE_BASE_URL )
5496
5504
payload ["originBoardId" ] = board_id
5497
5505
r = self ._session .post (url , data = json .dumps (payload ))
5498
- raw_issue_json = json_loads (r )
5506
+ raw_sprint_json = json_loads (r )
5499
5507
5500
- return Sprint (self ._options , self ._session , raw = raw_issue_json )
5508
+ return Sprint (self ._options , self ._session , raw = raw_sprint_json )
5501
5509
5502
5510
def add_issues_to_sprint (self , sprint_id : int , issue_keys : list [str ]) -> Response :
5503
5511
"""Add the issues in ``issue_keys`` to the ``sprint_id``.
0 commit comments