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
Remove attendee and organizer values from calendar subscription
Oliver Günther50f1808577db
diff --git a/modules/calendar/app/services/calendar/create_ical_service.rb b/modules/calendar/app/services/calendar/create_ical_service.rbindex 8fef8864a54..8b528c1762a 100644--- a/modules/calendar/app/services/calendar/create_ical_service.rb+++ b/modules/calendar/app/services/calendar/create_ical_service.rb@@ -60,7 +60,6 @@ module Calendardef add_values_to_event(event, work_package)%i[uid- organizersummarydtstampdtstart@@ -71,27 +70,13 @@ module Calendarevent.send("#{value}=", send("#{value}_value", work_package))end- add_attendee_value(event, work_package)+ eventenddef uid_value(work_package)"#{work_package.id}@#{host}"end- def attendee_value(work_package)- Icalendar::Values::CalAddress.new(- "mailto:#{work_package.assigned_to&.mail}",- cn: work_package.assigned_to&.name- )- end-- def organizer_value(work_package)- Icalendar::Values::CalAddress.new(- "mailto:#{work_package.author&.mail}",- cn: work_package.author&.name- )- end-def summary_value(work_package)work_package.nameend@@ -132,19 +117,13 @@ module CalendarOpenProject::StaticRouting::UrlHelpers.hostend- def add_attendee_value(event, work_package)- # event.attendee = [work_package.assigned_to&.name] # causing thunderbird error "id is null"- event.attendee = attendee_value(work_package) if work_package.assigned_to.present?-- event- end-def description_value(work_package)%i[projecttypestatusassigned_to+ authorpriority].map do |attribute|translated_attribute_name_and_value(work_package, attribute)diff --git a/modules/calendar/spec/services/create_ical_service_spec.rb b/modules/calendar/spec/services/create_ical_service_spec.rbindex c8f3e714ce1..0fdc154f1c9 100644--- a/modules/calendar/spec/services/create_ical_service_spec.rb+++ b/modules/calendar/spec/services/create_ical_service_spec.rb@@ -95,9 +95,8 @@ RSpec.describe Calendar::CreateICalService, type: :model doUID:#{work_package_with_due_date.id}@localhost:3000DTSTART;VALUE=DATE:#{work_package_with_due_date.due_date.strftime('%Y%m%d')}DTEND;VALUE=DATE:#{(work_package_with_due_date.due_date + 1.day).strftime('%Y%m%d')}- DESCRIPTION:Project: #{project.name}\nType: None\nStatus: #{work_package_with_due_date.status.name}\nAssignee: \nPriority: #{work_package_with_due_date.priority.name}\n\nDescription:\n#{work_package_with_due_date.description}+ DESCRIPTION:Project: #{project.name}\nType: None\nStatus: #{work_package_with_due_date.status.name}\nAssignee: \nAuthor: #{work_package_with_due_date.author.name}\nPriority: #{work_package_with_due_date.priority.name}\n\nDescription:\n#{work_package_with_due_date.description}LOCATION:http://localhost:3000/work_packages/#{work_package_with_due_date.id}- ORGANIZER;CN=#{work_package_with_due_date.author.name}:mailto:#{work_package_with_due_date.author.mail}SUMMARY:#{work_package_with_due_date.name}END:VEVENTBEGIN:VEVENT@@ -105,9 +104,8 @@ RSpec.describe Calendar::CreateICalService, type: :model doUID:#{work_package_with_start_date.id}@localhost:3000DTSTART;VALUE=DATE:#{work_package_with_start_date.start_date.strftime('%Y%m%d')}DTEND;VALUE=DATE:#{(work_package_with_start_date.start_date + 1.day).strftime('%Y%m%d')}- DESCRIPTION:Project: #{project.name}\nType: None\nStatus: #{work_package_with_start_date.status.name}\nAssignee: \nPriority: #{work_package_with_start_date.priority.name}\n\nDescription:\n#{work_package_with_start_date.description}+ DESCRIPTION:Project: #{project.name}\nType: None\nStatus: #{work_package_with_start_date.status.name}\nAssignee: \nAuthor: #{work_package_with_start_date.author.name}\nPriority: #{work_package_with_start_date.priority.name}\n\nDescription:\n#{work_package_with_start_date.description}LOCATION:http://localhost:3000/work_packages/#{work_package_with_start_date.id}- ORGANIZER;CN=#{work_package_with_start_date.author.name}:mailto:#{work_package_with_start_date.author.mail}SUMMARY:#{work_package_with_start_date.name}END:VEVENTBEGIN:VEVENT@@ -115,9 +113,8 @@ RSpec.describe Calendar::CreateICalService, type: :model doUID:#{work_package_with_start_and_due_date.id}@localhost:3000DTSTART;VALUE=DATE:#{work_package_with_start_and_due_date.start_date.strftime('%Y%m%d')}DTEND;VALUE=DATE:#{(work_package_with_start_and_due_date.due_date + 1.day).strftime('%Y%m%d')}- DESCRIPTION:Project: #{project.name}\nType: None\nStatus: #{work_package_with_start_and_due_date.status.name}\nAssignee: \nPriority: #{work_package_with_start_and_due_date.priority.name}\n\nDescription:\n#{work_package_with_start_and_due_date.description}+ DESCRIPTION:Project: #{project.name}\nType: None\nStatus: #{work_package_with_start_and_due_date.status.name}\nAssignee: \nAuthor: #{work_package_with_start_and_due_date.author.name}\nPriority: #{work_package_with_start_and_due_date.priority.name}\n\nDescription:\n#{work_package_with_start_and_due_date.description}LOCATION:http://localhost:3000/work_packages/#{work_package_with_start_and_due_date.id}- ORGANIZER;CN=#{work_package_with_start_and_due_date.author.name}:mailto:#{work_package_with_start_and_due_date.author.mail}SUMMARY:#{work_package_with_start_and_due_date.name}END:VEVENTBEGIN:VEVENT@@ -125,11 +122,9 @@ RSpec.describe Calendar::CreateICalService, type: :model doUID:#{work_package_with_due_date_and_assignee.id}@localhost:3000DTSTART;VALUE=DATE:#{work_package_with_due_date_and_assignee.due_date.strftime('%Y%m%d')}DTEND;VALUE=DATE:#{(work_package_with_due_date_and_assignee.due_date + 1.day).strftime('%Y%m%d')}- DESCRIPTION:Project: #{project.name}\nType: None\nStatus: #{work_package_with_due_date_and_assignee.status.name}\nAssignee: #{work_package_with_due_date_and_assignee.assigned_to.name}\nPriority: #{work_package_with_due_date_and_assignee.priority.name}\n\nDescription:\n#{work_package_with_due_date_and_assignee.description}+ DESCRIPTION:Project: #{project.name}\nType: None\nStatus: #{work_package_with_due_date_and_assignee.status.name}\nAssignee: #{work_package_with_due_date_and_assignee.assigned_to.name}\nAuthor: #{work_package_with_due_date_and_assignee.author.name}\nPriority: #{work_package_with_due_date_and_assignee.priority.name}\n\nDescription:\n#{work_package_with_due_date_and_assignee.description}LOCATION:http://localhost:3000/work_packages/#{work_package_with_due_date_and_assignee.id}- ORGANIZER;CN=#{work_package_with_due_date_and_assignee.author.name}:mailto:#{work_package_with_due_date_and_assignee.author.mail}SUMMARY:#{work_package_with_due_date_and_assignee.name}- ATTENDEE;CN=#{work_package_with_due_date_and_assignee.assigned_to.name}:mailto:#{work_package_with_due_date_and_assignee.assigned_to.mail}END:VEVENTEND:VCALENDAREOICAL