OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
[#57016] updated status API specification
Eric Schubertc7062bd05974
diff --git a/docs/api/apiv3/components/examples/status_collection.yml b/docs/api/apiv3/components/examples/status_collection.ymlindex c2756848fc2..d12e01ba2aa 100644--- a/docs/api/apiv3/components/examples/status_collection.yml+++ b/docs/api/apiv3/components/examples/status_collection.yml@@ -1,72 +1,89 @@-# Example: Status collection----+description: |-+ A standard, unpaginated collection of status.value:+ _type: Collection+ count: 6+ total: 6_embedded:elements:- - _links:- self:- href: "/api/v3/statuses/1"- _type: Status- defaultDoneRatio: 0+ - _type: Statusid: 1+ name: NewisClosed: false+ color: '#3997AD'isDefault: true- name: New+ isReadonly: false+ excludedFromTotals: false+ defaultDoneRatio: 0position: 1- - _links:+ _links:self:- href: "/api/v3/statuses/3"- _type: Status- defaultDoneRatio: 75+ href: '/api/v3/statuses/1'+ - _type: Statusid: 3+ name: ResolvedisClosed: false+ color: '#93D2AE'isDefault: falseisReadonly: false- name: Resolved+ excludedFromTotals: false+ defaultDoneRatio: 75position: 3- - _links:+ _links:self:- href: "/api/v3/statuses/4"- _type: Status- defaultDoneRatio: 25+ href: '/api/v3/statuses/3'+ - _type: Statusid: 4+ name: FeedbackisClosed: false+ color: '#A96FFE'isDefault: false- name: Feedback+ isReadonly: false+ excludedFromTotals: false+ defaultDoneRatio: 25position: 4- - _links:+ _links:self:- href: "/api/v3/statuses/5"- _type: Status- defaultDoneRatio: 100+ href: '/api/v3/statuses/4'+ - _type: Statusid: 5+ name: ClosedisClosed: true+ color: '#DF6DA1'isDefault: false- name: Closed+ isReadonly: false+ excludedFromTotals: false+ defaultDoneRatio: 100position: 5- - _links:+ _links:self:- href: "/api/v3/statuses/6"- _type: Status- defaultDoneRatio: 100+ href: '/api/v3/statuses/5'+ - _type: Statusid: 6+ name: RejectedisClosed: true+ color: '#D32937'isDefault: false- name: Rejected+ isReadonly: true+ excludedFromTotals: true+ defaultDoneRatio: 100position: 6- - _links:+ _links:self:- href: "/api/v3/statuses/2"- _type: Status- defaultDoneRatio: 50+ href: '/api/v3/statuses/6'+ - _type: Statusid: 2+ name: In ProgressisClosed: false+ color: '#3852C6'isDefault: false- name: In Progress+ isReadonly: false+ excludedFromTotals: false+ defaultDoneRatio: 50position: 3+ _links:+ self:+ href: '/api/v3/statuses/2'_links:self:- href: "/api/v3/statuses"- _type: Collection- count: 6- total: 6+ href: '/api/v3/statuses'diff --git a/docs/api/apiv3/components/examples/status_response.yml b/docs/api/apiv3/components/examples/status_response.ymlnew file mode 100644index 00000000000..7a132dd9bf1--- /dev/null+++ b/docs/api/apiv3/components/examples/status_response.yml@@ -0,0 +1,16 @@+description: A standard status resource response.+value:+ _type: Status+ id: 13+ name: Waiting for Darth-approval+ isClosed: false+ color: '#FE005D'+ isDefault: false+ isReadonly: false+ excludedFromTotals: false+ defaultDoneRatio: 66+ position: 4+ _links:+ self:+ href: '/api/v3/statuses/13'+ title: Waiting for Darth-approvaldiff --git a/docs/api/apiv3/components/schemas/status_collection_model.yml b/docs/api/apiv3/components/schemas/status_collection_model.ymlindex f4031bf22c1..ee670be3528 100644--- a/docs/api/apiv3/components/schemas/status_collection_model.yml+++ b/docs/api/apiv3/components/schemas/status_collection_model.yml@@ -4,21 +4,8 @@ allOf:- $ref: './collection_model.yml'- type: objectrequired:- - _links- _embeddedproperties:- _links:- type: object- required:- - self- properties:- self:- allOf:- - $ref: './link.yml'- - description: |-- This file links collection-- **Resource**: StatusCollectionModel_embedded:type: objectrequired:diff --git a/docs/api/apiv3/components/schemas/status_model.yml b/docs/api/apiv3/components/schemas/status_model.ymlindex da3f9113e6f..e17ae638423 100644--- a/docs/api/apiv3/components/schemas/status_model.yml+++ b/docs/api/apiv3/components/schemas/status_model.yml@@ -9,52 +9,45 @@ properties:id:type: integerdescription: Status id- readOnly: trueminimum: 1name:type: stringdescription: Status name- readOnly: true- position:- type: integer- description: Sort index of the status- readOnly: true- isDefault:- type: boolean- readOnly: trueisClosed:type: boolean- description: are tickets of this status considered closed?- readOnly: true+ description: Indicates, whether work package of this status are considered closed+ color:+ type: string+ format: hex-code+ description: The color of the status+ isDefault:+ type: boolean+ description: True, if this status is the default status for new work packagesisReadonly:type: boolean- description: are tickets of this status read only?- readOnly: true+ description: Indicates, whether work package of this status are readonly+ excludedFromTotals:+ type: boolean+ description: |-+ Indicates, whether work package of this status are excluded from totals of `Work`, `Remaining work`, and+ `% Complete` in a hierarchy.defaultDoneRatio:type: integerdescription: The percentageDone being applied when changing to this status+ minimum: 0maximum: 100+ position:+ type: integer+ description: Sort index of the status_links:type: objectrequired:- - self+ - selfproperties:self:allOf:- - "$ref": "./link.yml"- - description: |-- This status-- **Resource**: Status- readOnly: true-example:- _links:- self:- href: "/api/v3/statuses/1"- _type: Status- id: 1- name: New- position: 1- isDefault: true- isClosed: false- defaultDoneRatio: 0+ - $ref: './link.yml'+ - description: |-+ This status++ **Resource**: Statusdiff --git a/docs/api/apiv3/openapi-spec.yml b/docs/api/apiv3/openapi-spec.ymlindex c9ffc28257e..9175c3f08b8 100644--- a/docs/api/apiv3/openapi-spec.yml+++ b/docs/api/apiv3/openapi-spec.yml@@ -527,6 +527,10 @@ components:$ref: "./components/examples/relation_response.yml"RelationUpdateRequest:$ref: "./components/examples/relation_update_request.yml"+ StatusCollection:+ $ref: "./components/examples/status_collection.yml"+ StatusResponse:+ $ref: "./components/examples/status_response.yml"StorageNextcloudResponse:$ref: "./components/examples/storage-nextcloud-response.yml"StorageNextcloudResponseForCreation:@@ -537,16 +541,14 @@ components:$ref: "./components/examples/storage-one-drive-incomplete-response.yml"StorageOneDriveResponse:$ref: "./components/examples/storage-one-drive-response.yml"+ StoragesSimpleCollectionModel:+ $ref: "./components/examples/storages-simple-collection-response.yml"QueriesModel:$ref: "./components/examples/queries.yml"QueryModel:$ref: "./components/examples/query.yml"QuerySchemaModel:$ref: "./components/examples/query_schema.yml"- StatusCollection:- $ref: "./components/examples/status_collection.yml"- StoragesSimpleCollectionModel:- $ref: "./components/examples/storages-simple-collection-response.yml"UserResponse:$ref: "./components/examples/user-response.yml"ValuesPropertyStartDateSchema:diff --git a/docs/api/apiv3/paths/status.yml b/docs/api/apiv3/paths/status.ymlindex b20d4d852b3..5edf3a96530 100644--- a/docs/api/apiv3/paths/status.yml+++ b/docs/api/apiv3/paths/status.yml@@ -1,53 +1,54 @@# /api/v3/statuses/{id}---get:+ summary: Get a work package status+ operationId: get_status+ tags:+ - Statuses+ description: |-+ Returns a work package status by its unique identifier.parameters:- - description: Status id- example: '1'- in: path- name: id- required: true- schema:- type: integer+ - name: id+ description: Status id+ in: path+ required: true+ schema:+ type: integer+ example: '1'responses:'200':+ description: OKcontent:application/hal+json:examples:response:- value:- _links:- self:- href: "/api/v3/statuses/1"- _type: Status- defaultDoneRatio: 0- id: 1- isClosed: false- isDefault: true- name: New- position: 1+ $ref: '../components/examples/status_response.yml'schema:- "$ref": "../components/schemas/status_model.yml"- description: OK- headers: {}+ $ref: '../components/schemas/status_model.yml''403':+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** view work package (on any project)content:application/hal+json:schema:- $ref: "../components/schemas/error_response.yml"+ $ref: '../components/schemas/error_response.yml'examples:response:value:_type: ErrorerrorIdentifier: urn:openproject-org:api:v3:errors:MissingPermissionmessage: You are not allowed to see this status.- description: |-- Returned if the client does not have sufficient permissions.-- **Required permission:** view work package (on any project)- headers: {}- tags:- - Statuses- description: ''- operationId: View_Status- summary: View Status+ '404':+ description: Returned if the status does not exist.+ content:+ application/hal+json:+ schema:+ $ref: '../components/schemas/error_response.yml'+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The requested resource could not be found.diff --git a/docs/api/apiv3/paths/statuses.yml b/docs/api/apiv3/paths/statuses.ymlindex 557b4a7c987..8468298e75b 100644--- a/docs/api/apiv3/paths/statuses.yml+++ b/docs/api/apiv3/paths/statuses.yml@@ -1,35 +1,33 @@# /api/v3/statuses---get:+ summary: List the collection of all status+ operationId: list_status+ tags:+ - Statuses+ description: Returns a collection of all work package status.responses:'200':+ description: OKcontent:application/hal+json:examples:'simple status collection':- $ref: "../components/examples/status_collection.yml"+ $ref: '../components/examples/status_collection.yml'schema:- "$ref": "../components/schemas/status_collection_model.yml"- description: OK- headers: {}+ $ref: '../components/schemas/status_collection_model.yml''403':+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** view work package (on any project)content:application/hal+json:schema:- $ref: "../components/schemas/error_response.yml"+ $ref: '../components/schemas/error_response.yml'examples:response:value:_type: ErrorerrorIdentifier: urn:openproject-org:api:v3:errors:MissingPermissionmessage: You are not allowed to see the statuses.- description: |-- Returned if the client does not have sufficient permissions.-- **Required permission:** view work package (on any project)- headers: {}- tags:- - Statuses- description: ''- operationId: List_all_Statuses- summary: List all Statuses