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 url to meeting/series also to the description
Oliver Günther1fa63ff44457
diff --git a/modules/meeting/app/controllers/recurring_meetings_controller.rb b/modules/meeting/app/controllers/recurring_meetings_controller.rbindex 6bace7d4f25..d87803ba58c 100644--- a/modules/meeting/app/controllers/recurring_meetings_controller.rb+++ b/modules/meeting/app/controllers/recurring_meetings_controller.rb@@ -209,7 +209,7 @@ class RecurringMeetingsController < ApplicationControllerif params[:occurrence_id].present?occurrence = @recurring_meeting.meetings.find_by(id: params[:occurrence_id])["#{@recurring_meeting.title} - #{occurrence.start_time.to_date.iso8601}",- service.generate_occurrence(occurrence)]+ service.generate_single_occurrence(meeting: occurrence)]else[@recurring_meeting.title, service.generate_series]enddiff --git a/modules/meeting/app/services/meetings/icalendar_builder.rb b/modules/meeting/app/services/meetings/icalendar_builder.rbindex 99483cf81d9..ffbfeabe530 100644--- a/modules/meeting/app/services/meetings/icalendar_builder.rb+++ b/modules/meeting/app/services/meetings/icalendar_builder.rb@@ -59,9 +59,12 @@ module Meetingse.last_modified = meeting.updated_at.utce.sequence = meeting.lock_version- e.url = url_helpers.meeting_url(meeting)+ url = url_helpers.meeting_url(meeting)+ e.url = url++ e.description = I18n.t(:text_meeting_ics_description, url:)e.summary = meeting.title- e.description = meeting.title+e.uid = meeting.uide.organizer = ical_organizere.location = meeting.location.presence@@ -79,7 +82,10 @@ module Meetingscalendar.event do |e|e.uid = recurring_meeting.uide.summary = recurring_meeting.title- e.description = recurring_meeting.title++ url = url_helpers.recurring_meeting_url(recurring_meeting)+ e.url = url+ e.description = I18n.t(:text_meeting_ics_meeting_series_description, url:)e.organizer = ical_organizere.created = recurring_meeting.template.created_at.utc@@ -89,7 +95,6 @@ module Meetingse.rrule = recurring_meeting.schedule.rrules.first.to_ical # We currently only have one recurrence rulee.dtstart = ical_datetime(recurring_meeting.template.start_time)e.dtend = ical_datetime(recurring_meeting.template.end_time)- e.url = url_helpers.project_recurring_meeting_url(recurring_meeting.project, recurring_meeting)e.location = recurring_meeting.template.location.presencee.status = if cancelled"CANCELLED"@@ -114,7 +119,12 @@ module Meetingscalendar.event do |e|e.uid = recurring_meeting.uide.summary = recurring_meeting.title- e.description = recurring_meeting.title++ occurrence_url = url_helpers.meeting_url(meeting)+ e.url = occurrence_url+ e.description = I18n.t(:text_meeting_occurrence_ics_description,+ series_url: url_helpers.recurring_meeting_url(recurring_meeting),+ url: occurrence_url)e.organizer = ical_organizere.created = meeting.created_at.utc@@ -124,7 +134,6 @@ module Meetingse.recurrence_id = ical_datetime(scheduled_meeting.start_time)e.dtstart = ical_datetime(meeting.start_time)e.dtend = ical_datetime(meeting.end_time)- e.url = url_helpers.project_meeting_url(meeting.project, meeting)e.location = meeting.location.presenceadd_attendees(event: e, meeting: meeting)diff --git a/modules/meeting/config/locales/en.yml b/modules/meeting/config/locales/en.ymlindex 2f0adb99dfd..710d9349fc3 100644--- a/modules/meeting/config/locales/en.yml+++ b/modules/meeting/config/locales/en.yml@@ -504,6 +504,14 @@ en:text_meeting_minutes_for_meeting: 'minutes for the meeting "%{meeting}"'text_notificiation_invited: "This mail contains an ics entry for the meeting below:"+ text_meeting_ics_description: >-+ Link to meeting: %{url}+ text_meeting_ics_meeting_series_description: >-+ Link to meeting series: %{url}+ text_meeting_occurrence_ics_description: >-+ Link to meeting occurrence: %{url}++ Link to meeting series: %{series_url}text_meeting_empty_heading: "Your meeting is empty"text_meeting_empty_description1: "Start by adding agenda items below. Each item can be as simple as just a title, but you can also add additional details like duration and notes."text_meeting_empty_description2: 'You can also add references to existing work packages. When you do, related notes will automatically be visible in the work package''s "Meetings" tab.'diff --git a/modules/meeting/spec/mailers/meeting_mailer_spec.rb b/modules/meeting/spec/mailers/meeting_mailer_spec.rbindex 1661311fe39..9e1fe3fde3f 100644--- a/modules/meeting/spec/mailers/meeting_mailer_spec.rb+++ b/modules/meeting/spec/mailers/meeting_mailer_spec.rb@@ -256,7 +256,7 @@ RSpec.describe MeetingMailer doexpect(entry.dtstart.utc).to eq meeting.start_timeexpect(entry.dtend.utc).to eq meeting.start_time + 1.hourexpect(entry.summary).to eq "Important meeting"- expect(entry.description).to eq "Important meeting"+ expect(entry.description).to eq "Link to meeting: http://#{Setting.host_name}/meetings/#{meeting.id}"expect(entry.location).to eq(meeting.location.presence)enddiff --git a/modules/meeting/spec/mailers/meeting_series_mailer_spec.rb b/modules/meeting/spec/mailers/meeting_series_mailer_spec.rbindex 8fabb6d8806..a7ac45a0f1d 100644--- a/modules/meeting/spec/mailers/meeting_series_mailer_spec.rb+++ b/modules/meeting/spec/mailers/meeting_series_mailer_spec.rb@@ -138,7 +138,7 @@ RSpec.describe MeetingSeriesMailer doexpect(parsed.length).to eq 1expect(entry.summary).to eq "Recurring Standup"- expect(entry.description).to eq "Recurring Standup"+ expect(entry.description).to eq "Link to meeting series: http://#{Setting.host_name}/recurring_meetings/#{series.id}"expect(entry.location).to eq(series.template&.location.presence)endenddiff --git a/modules/meeting/spec/services/all_meetings/ical_service_spec.rb b/modules/meeting/spec/services/all_meetings/ical_service_spec.rbindex c091b0cbfc1..49a149a344a 100644--- a/modules/meeting/spec/services/all_meetings/ical_service_spec.rb+++ b/modules/meeting/spec/services/all_meetings/ical_service_spec.rb@@ -134,7 +134,7 @@ RSpec.describe AllMeetings::ICalService, type: :model do # rubocop:disable RSpecexpect(entry.dtstart.utc).to eq meeting.start_timeexpect(entry.dtend.utc).to eq meeting.start_time + 1.hourexpect(entry.summary).to eq "Important meeting"- expect(entry.description).to eq "Important meeting"+ expect(entry.description).to eq "Link to meeting: http://#{Setting.host_name}/meetings/#{meeting.id}"expect(entry.location).to eq(meeting.location.presence)expect(entry.dtstart).to eq (relevant_time + 1.week).in_time_zone("Europe/Berlin")expect(entry.dtend).to eq (relevant_time + 1.week + 1.hour).in_time_zone("Europe/Berlin")@@ -184,7 +184,7 @@ RSpec.describe AllMeetings::ICalService, type: :model do # rubocop:disable RSpecexpect(entry.organizer.to_s).to eq("mailto:#{Setting.mail_from}")expect(entry.attendee.map(&:to_s)).to match_array([user, user2].map { |u| "mailto:#{u.mail}" })expect(entry.summary).to eq "Recurring meeting"- expect(entry.description).to eq "Recurring meeting"+ expect(entry.description).to eq "Link to meeting series: http://#{Setting.host_name}/recurring_meetings/#{recurring_meeting.id}"expect(entry.location).to eq(recurring_meeting.template.location.presence)expect(entry.exdate).to be_empty@@ -226,7 +226,12 @@ RSpec.describe AllMeetings::ICalService, type: :model do # rubocop:disable RSpecexpect(entry.organizer.to_s).to eq("mailto:#{Setting.mail_from}")expect(entry.attendee).to be_emptyexpect(entry.summary).to eq "Recurring meeting"- expect(entry.description).to eq "Recurring meeting"+ description = <<~STR.strip+ Link to meeting occurrence: http://#{Setting.host_name}/meetings/#{meeting.id}+ Link to meeting series: http://#{Setting.host_name}/recurring_meetings/#{recurring_meeting.id}+ STR++ expect(entry.description.to_s).to eq descriptionexpect(entry.location).to eq(recurring_meeting.template.location.presence)expect(entry.sequence).to eq(meeting.lock_version)expect(entry.status).to eq "CONFIRMED"diff --git a/modules/meeting/spec/services/meetings/ical_service_spec.rb b/modules/meeting/spec/services/meetings/ical_service_spec.rbindex 7600f23b0f1..9eec8c32173 100644--- a/modules/meeting/spec/services/meetings/ical_service_spec.rb+++ b/modules/meeting/spec/services/meetings/ical_service_spec.rb@@ -85,7 +85,7 @@ RSpec.describe Meetings::ICalService, type: :model do # rubocop:disable RSpec/Spexpect(entry.dtstart.utc).to eq meeting.start_timeexpect(entry.dtend.utc).to eq meeting.start_time + 1.hourexpect(entry.summary).to eq "Important meeting"- expect(entry.description).to eq "Important meeting"+ expect(entry.description).to eq "Link to meeting: http://#{Setting.host_name}/meetings/#{meeting.id}"expect(entry.location).to eq(meeting.location.presence)expect(entry.dtstart).to eq Time.zone.parse("2021-01-19T10:00:00Z").in_time_zone("Europe/Berlin")expect(entry.dtend).to eq (Time.zone.parse("2021-01-19T10:00:00Z") + 1.hour).in_time_zone("Europe/Berlin")@@ -95,8 +95,8 @@ RSpec.describe Meetings::ICalService, type: :model do # rubocop:disable RSpec/Spreal_standard = Time.zone.parse("01-11-2020 06:00:00")daylight = daylight_zone.dtstart.to_timereal_daylight = Time.zone.parse("14-03-2021 07:00:00")- expect(standard.strftime("%a, %d %b %Y %H:%M:%S")).to eq (real_standard.strftime("%a, %d %b %Y %H:%M:%S"))- expect(daylight.strftime("%a, %d %b %Y %H:%M:%S")).to eq (real_daylight.strftime("%a, %d %b %Y %H:%M:%S"))+ expect(standard.strftime("%a, %d %b %Y %H:%M:%S")).to eq(real_standard.strftime("%a, %d %b %Y %H:%M:%S"))+ expect(daylight.strftime("%a, %d %b %Y %H:%M:%S")).to eq(real_daylight.strftime("%a, %d %b %Y %H:%M:%S"))endendenddiff --git a/modules/meeting/spec/services/recurring_meetings/ical_service_spec.rb b/modules/meeting/spec/services/recurring_meetings/ical_service_spec.rbindex 97c4faee7c3..5ffba419166 100644--- a/modules/meeting/spec/services/recurring_meetings/ical_service_spec.rb+++ b/modules/meeting/spec/services/recurring_meetings/ical_service_spec.rb@@ -159,15 +159,15 @@ RSpec.describe RecurringMeetings::ICalService, type: :model do # rubocop:disableexpect(first).to include("DTSTART;TZID=America/New_York:20241208T050000")expect(first).to include("DTEND;TZID=America/New_York:20241208T060000")- expect(first).to include("URL:http://#{Setting.host_name}/projects/my-project/meetings/#{schedule.meeting_id}")+ expect(first).to include("URL:http://#{Setting.host_name}/meetings/#{schedule.meeting_id}")expect(second).to include("DTSTART;TZID=America/New_York:20250216T050000")expect(second).to include("DTEND;TZID=America/New_York:20250216T060000")- expect(second).to include("URL:http://#{Setting.host_name}/projects/my-project/meetings/#{schedule2.meeting_id}")+ expect(second).to include("URL:http://#{Setting.host_name}/meetings/#{schedule2.meeting_id}")expect(moved).to include("DTSTART;TZID=America/New_York:20241216T063000")expect(moved).to include("DTEND;TZID=America/New_York:20241216T073000")- expect(moved).to include("URL:http://#{Setting.host_name}/projects/my-project/meetings/#{moved_schedule.meeting_id}")+ expect(moved).to include("URL:http://#{Setting.host_name}/meetings/#{moved_schedule.meeting_id}")endendend