Skip to content

Commit

Permalink
Add projectstatuses method and edit statuses method docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
kayx23 committed Dec 31, 2021
1 parent 09ece94 commit 014480e
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion jira/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2915,7 +2915,7 @@ def myself(self) -> Dict[str, Any]:
# Status

def statuses(self) -> List[Status]:
"""Get a list of status Resources from the server.
"""Get a list of all status Resources from the server.
Returns:
List[Status]
Expand All @@ -2927,6 +2927,19 @@ def statuses(self) -> List[Status]:
]
return statuses

def projectstatuses(self, projectIdOrKey: str) -> List[Status]:
"""Get a list of statuses available within a project from the server.
Returns:
List[Status]
"""
r_json = self._get_json("project/{projectIdOrKey}/statuses")
statuses = [
Status(self._options, self._session, raw_stat_json)
for raw_stat_json in r_json
]
return statuses

def status(self, id: str) -> Status:
"""Get a status Resource from the server.
Expand Down

0 comments on commit 014480e

Please sign in to comment.