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 attribute "name" to ViewRepresenter
Wieland Lindenthalc0faea6cbf99
diff --git a/lib/api/v3/views/view_representer.rb b/lib/api/v3/views/view_representer.rbindex 44e5c26b6ee..882ce9061d9 100644--- a/lib/api/v3/views/view_representer.rb+++ b/lib/api/v3/views/view_representer.rb@@ -78,6 +78,11 @@ module APIquery.starred}+ property :name,+ getter: ->(*) {+ query.name+ }+date_time_property :created_atdate_time_property :updated_atdiff --git a/spec/lib/api/v3/views/view_representer_rendering_spec.rb b/spec/lib/api/v3/views/view_representer_rendering_spec.rbindex d2b79861c54..23f7bf103ef 100644--- a/spec/lib/api/v3/views/view_representer_rendering_spec.rb+++ b/spec/lib/api/v3/views/view_representer_rendering_spec.rb@@ -93,6 +93,14 @@ describe ::API::V3::Views::ViewRepresenter, 'rendering' doendend+ describe 'name' do+ context 'with the query being name' do+ it_behaves_like 'property', :name do+ let(:value) { query.name }+ end+ end+ end+describe 'timestamps' doit_behaves_like 'datetime property', :createdAt dolet(:value) { view.created_at }