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
Add alias conversion from `status_code` to `status`
Aaron Contreras175831bf56fa
diff --git a/config/constants/ar_to_api_conversions.rb b/config/constants/ar_to_api_conversions.rbindex 9923b945f03..bc5a2fdde3c 100644--- a/config/constants/ar_to_api_conversions.rb+++ b/config/constants/ar_to_api_conversions.rb@@ -35,6 +35,7 @@ module Constantsassigned_to: 'assignee',version: 'version',done_ratio: 'percentageDone',+ status_code: 'status',estimated_hours: 'estimatedTime',remaining_hours: 'remainingTime',spent_hours: 'spentTime',diff --git a/lib/api/decorators/linked_resource.rb b/lib/api/decorators/linked_resource.rbindex b76d99deda4..a7bc30db1fc 100644--- a/lib/api/decorators/linked_resource.rb+++ b/lib/api/decorators/linked_resource.rb@@ -60,14 +60,16 @@ module APIgetter:,setter:,link:,+ as: name,uncacheable_link: false,show_if: ->(*) { true },skip_render: nil,embedded: true)- link(link_attr(name, uncacheable_link), &link)+ link(link_attr(as, uncacheable_link), &link)property name,+ as:,exec_context: :decorator,getter:,setter:,diff --git a/lib/api/v3/projects/copy/project_copy_payload_representer.rb b/lib/api/v3/projects/copy/project_copy_payload_representer.rbindex 18563d0573a..70c1e43d8a8 100644--- a/lib/api/v3/projects/copy/project_copy_payload_representer.rb+++ b/lib/api/v3/projects/copy/project_copy_payload_representer.rb@@ -39,10 +39,6 @@ module APIdef meta_representer_classProjectCopyMetaRepresenterend-- def writable_attributes- super + %w[status]- endendendenddiff --git a/lib/api/v3/projects/project_payload_representer.rb b/lib/api/v3/projects/project_payload_representer.rbindex 079b35e5a35..0956a775daa 100644--- a/lib/api/v3/projects/project_payload_representer.rb+++ b/lib/api/v3/projects/project_payload_representer.rb@@ -33,10 +33,6 @@ module APIinclude ::API::Utilities::PayloadRepresentercached_representer disabled: true-- def writable_attributes- super + %w[status]- endendendenddiff --git a/lib/api/v3/projects/project_representer.rb b/lib/api/v3/projects/project_representer.rbindex 27a8eba2bde..a919d024462 100644--- a/lib/api/v3/projects/project_representer.rb+++ b/lib/api/v3/projects/project_representer.rb@@ -188,7 +188,8 @@ module APIdate_time_property :updated_at- resource :status,+ resource :status_code,+ as: :status,getter: ->(*) {next unless represented.status_code