This gem does not implement Workflow Status Category as a proper resource so it can be treated like an object.
This PR adds the JIRA::Resource::StatusCategory and relationship from JIRA::Resource::Status to this resource. This enables:
Listing all status categores in Jira using client.StatusCategory.all
Accessing the status category of a status via the status object. For example: status.status_category.id, status.status_category.name, etc. Before this change, the status category of a status was exposed as a hash via status.attrs[:statusCategory]
I believe this change is backward compatible even if client.Field.map_fields is called since the mapping would create status#statusCategory method which would not conflict with status#status_category. I also believe this gem would work if the server did not return statusCategory data in the status objects.
In addition to adding the status_category mocked responses, I have also added statusCategory data to the status mocked responses.
There is a surprising change needed to lib/jira/base.rb because the ids for statuscategory resources are an Integer where all other resources have String keys. This is how Jira returns these objects.
This gem does not implement Workflow Status Category as a proper resource so it can be treated like an object.
This PR adds the JIRA::Resource::StatusCategory and relationship from JIRA::Resource::Status to this resource. This enables:
client.StatusCategory.all
status.status_category.id
,status.status_category.name
, etc. Before this change, the status category of a status was exposed as a hash viastatus.attrs[:statusCategory]
I believe this change is backward compatible even if
client.Field.map_fields
is called since the mapping would createstatus#statusCategory
method which would not conflict withstatus#status_category
. I also believe this gem would work if the server did not return statusCategory data in the status objects.In addition to adding the status_category mocked responses, I have also added statusCategory data to the status mocked responses.
There is a surprising change needed to lib/jira/base.rb because the ids for statuscategory resources are an Integer where all other resources have String keys. This is how Jira returns these objects.