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
rename hasReadonlyStatus to readonly
ulfertsb52a91aec43f
diff --git a/docs/api/apiv3/components/schemas/file_link_read_model.yml b/docs/api/apiv3/components/schemas/file_link_read_model.ymlindex 4c849a373ce..4f0ed7768fb 100644--- a/docs/api/apiv3/components/schemas/file_link_read_model.yml+++ b/docs/api/apiv3/components/schemas/file_link_read_model.yml@@ -169,7 +169,7 @@ example:raw: Develop super cool OpenProject API.html: "<p>Develop super cool OpenProject API.</p>"scheduleManually: false- hasReadonlyStatus: false+ readonly: falsestartDate:dueDate:createdAt: '2014-08-29T12:40:53Z'diff --git a/docs/api/apiv3/components/schemas/work_package_model.yml b/docs/api/apiv3/components/schemas/work_package_model.ymlindex 6525139dbfe..e119f3c6a26 100644--- a/docs/api/apiv3/components/schemas/work_package_model.yml+++ b/docs/api/apiv3/components/schemas/work_package_model.yml@@ -29,9 +29,9 @@ properties:scheduleManually:type: booleandescription: If false (default) schedule automatically.- hasReadonlyStatus:+ readonly:type: boolean- description: If true, the associated status is readonly. Only the status can be edited in this case.+ description: If true, the work package is in a readonly status so with the exception of the status, no other property can be altered.startDate:type: stringformat: date@@ -559,7 +559,7 @@ example:raw: Develop super cool OpenProject API.html: "<p>Develop super cool OpenProject API.</p>"scheduleManually: false- hasReadonlyStatus: false+ readonly: falsestartDate:dueDate:derivedStartDate:diff --git a/docs/api/apiv3/paths/work_package.yml b/docs/api/apiv3/paths/work_package.ymlindex cbab6504ce4..872be8acbd3 100644--- a/docs/api/apiv3/paths/work_package.yml+++ b/docs/api/apiv3/paths/work_package.yml@@ -203,7 +203,7 @@ get:id: 1528percentageDone: 0scheduleManually: false- hasReadonlyStatus: false+ readonly: falsestartDate:subject: Develop APIupdatedAt: '2014-08-29T12:44:41Z'@@ -389,7 +389,7 @@ patch:id: 1528percentageDone: 0scheduleManually: false- hasReadonlyStatus: false+ readonly: falsestartDate:subject: Develop APIupdatedAt: '2014-08-29T12:44:41Z'diff --git a/docs/api/apiv3/paths/work_packages.yml b/docs/api/apiv3/paths/work_packages.ymlindex 8bc066a3e9d..cfbd9736a2f 100644--- a/docs/api/apiv3/paths/work_packages.yml+++ b/docs/api/apiv3/paths/work_packages.yml@@ -312,7 +312,7 @@ post:id: 1528percentageDone: 0scheduleManually: false- hasReadonlyStatus: false+ readonly: falsestartDate:subject: Develop APIupdatedAt: '2014-08-29T12:44:41Z'diff --git a/docs/api/apiv3/tags/work_packages.yml b/docs/api/apiv3/tags/work_packages.ymlindex 4f6848bf351..bea0e6799ee 100644--- a/docs/api/apiv3/tags/work_packages.yml+++ b/docs/api/apiv3/tags/work_packages.yml@@ -52,7 +52,7 @@ description: |-| type | Name of the work package's type | String | not null | READ | || description | The work package description | Formattable | | READ / WRITE | || scheduleManually | If false (default) schedule automatically. | Boolean | | READ / WRITE | |- | hasReadonlyStatus | If true, the associated status is readonly. Only the status can be edited in this case. | Boolean | | READ | Enterprise edition only |+ | readonly | If true, the work package is in a readonly status so with the exception of the status, no other property can be altered. | Boolean | | READ | Enterprise edition only || startDate | Scheduled beginning of a work package | Date | Cannot be set for parent work packages; must be equal or greater than the earliest possible start date; Exists only on work packages of a non milestone type | READ / WRITE | || dueDate | Scheduled end of a work package | Date | Cannot be set for parent work packages; must be greater than or equal to the start date; Exists only on work packages of a non milestone type | READ / WRITE | || date | Date on which a milestone is achieved | Date | Exists only on work packages of a milestone type | READ / WRITE | |diff --git a/frontend/src/app/features/hal/schemas/work-package-schema-proxy.ts b/frontend/src/app/features/hal/schemas/work-package-schema-proxy.tsindex e209d1f27b6..e547952dbb7 100644--- a/frontend/src/app/features/hal/schemas/work-package-schema-proxy.ts+++ b/frontend/src/app/features/hal/schemas/work-package-schema-proxy.ts@@ -73,7 +73,7 @@ export class WorkPackageSchemaProxy extends SchemaProxy {}public get isReadonly():boolean {- return (this.resource.hasReadonlyStatus as boolean) || !!(this.resource.status as StatusResource|null)?.isReadonly;+ return (this.resource.readonly as boolean) || !!(this.resource.status as StatusResource|null)?.isReadonly;}/**diff --git a/lib/api/v3/work_packages/work_package_representer.rb b/lib/api/v3/work_packages/work_package_representer.rbindex 732a20a64f1..38ca0c82a0b 100644--- a/lib/api/v3/work_packages/work_package_representer.rb+++ b/lib/api/v3/work_packages/work_package_representer.rb@@ -427,7 +427,7 @@ module APIif: ->(*) { embed_links },uncacheable: true- property :hasReadonlyStatus,+ property :readonly,writeable: false,render_nil: false,getter: ->(*) dodiff --git a/spec/lib/api/v3/work_packages/work_package_representer_spec.rb b/spec/lib/api/v3/work_packages/work_package_representer_spec.rbindex f033ce59491..ea1a6e05d91 100644--- a/spec/lib/api/v3/work_packages/work_package_representer_spec.rb+++ b/spec/lib/api/v3/work_packages/work_package_representer_spec.rb@@ -364,11 +364,11 @@ describe ::API::V3::WorkPackages::WorkPackageRepresenter doit { is_expected.to be_json_eql(work_package.lock_version.to_json).at_path('lockVersion') }end- describe 'hasReadonlyStatus' do+ describe 'readonly' docontext 'no status' dolet(:status) { nil }it 'renders nothing' do- is_expected.not_to have_json_path('hasReadonlyStatus')+ is_expected.not_to have_json_path('readonly')endend@@ -376,7 +376,7 @@ describe ::API::V3::WorkPackages::WorkPackageRepresenter dolet(:status) { build_stubbed :status, is_readonly: false }it 'renders as false' do- is_expected.to be_json_eql(false.to_json).at_path('hasReadonlyStatus')+ is_expected.to be_json_eql(false.to_json).at_path('readonly')endend@@ -384,7 +384,7 @@ describe ::API::V3::WorkPackages::WorkPackageRepresenter dolet(:status) { build_stubbed :status, is_readonly: true }it 'renders as true' do- is_expected.to be_json_eql(true.to_json).at_path('hasReadonlyStatus')+ is_expected.to be_json_eql(true.to_json).at_path('readonly')endendend