On JIRA instances where hundreds of projects have defined their own workflow, they also end up defining their own status.
Whereas rest/{ver}/status returns all possible status values for all projects on a given JIRA instance, the above API tells you the statuses available to the given project key.
Possible solution(s)
I naïvely implemented this as a 'statuses()' object method for the Project class, something like:
def statuses():
if not self._statuses_raw:
# lazy load statuses for this project
spath = os.path.join(self._resource, "statuses")
url = self._get_url(spath.format(str(self)))
r_json = json_loads(self._session.get(url))
self._statuses_raw = r_json
[do stuff with self._statuses_raw]
... however, there's probably a considerably prettier way. The [do stuff] - I've mostly used the raw json but also returned a list of Issue Types (which then has their individual status types hanging off in the JSON data).
Alternatives
It's possible there is already a call for this and I have missed it.
Additional Context
Implementing tools that don't rely on knowledge of each project's specific workflows requires something like this. I'm happy to submit a PR for what I have, if desired.
Problem trying to solve
On JIRA instances where hundreds of projects have defined their own workflow, they also end up defining their own status.
Whereas rest/{ver}/status returns all possible status values for all projects on a given JIRA instance, the above API tells you the statuses available to the given project key.
Possible solution(s)
I naïvely implemented this as a 'statuses()' object method for the Project class, something like:
... however, there's probably a considerably prettier way. The [do stuff] - I've mostly used the raw json but also returned a list of Issue Types (which then has their individual status types hanging off in the JSON data).
Alternatives
It's possible there is already a call for this and I have missed it.
Additional Context
Implementing tools that don't rely on knowledge of each project's specific workflows requires something like this. I'm happy to submit a PR for what I have, if desired.