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 weekday resource link to api/v3/days
Dombi Attila12e6b898db2c
diff --git a/lib/api/v3/days/day_representer.rb b/lib/api/v3/days/day_representer.rbindex 26566ade244..85592d597c7 100644--- a/lib/api/v3/days/day_representer.rb+++ b/lib/api/v3/days/day_representer.rb@@ -34,6 +34,13 @@ module API::V3::Daysself_link path: :day, id_attribute: :date+ link :weekday do+ {+ href: api_v3_paths.days_week_day(represented.day_of_week),+ title: represented.name+ }+ end+links :nonWorkingReasons donext if represented.workingdiff --git a/spec/lib/api/v3/days/day_representer_spec.rb b/spec/lib/api/v3/days/day_representer_spec.rbindex 70b807a5f63..f0069adeba5 100644--- a/spec/lib/api/v3/days/day_representer_spec.rb+++ b/spec/lib/api/v3/days/day_representer_spec.rb@@ -120,5 +120,16 @@ describe ::API::V3::Days::DayRepresenter doendendend++ describe 'weekday' do+ it 'links to the weekday resource' do+ expected_json = {+ href: '/api/v3/days/week/2',+ title: 'Tuesday'+ }.to_json++ expect(subject).to be_json_eql(expected_json).at_path('_links/weekday')+ end+ endendend