Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include full address in ical event #1036

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

timkaechele
Copy link

@timkaechele timkaechele commented Feb 3, 2024

What it changes

This PR changes the ical events to actually include the address if present and only in the absence of a full address fall back to the name of the location

Why?

Because ruby user group events in Berlin are always at a different location, and I have trouble finding the place and the name of the location is not as helpful compared to an actual address your phone's calendar can help you find.

Bildschirmfoto 2024-02-03 um 14 43 37

Copy link
Member

@janz93 janz93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@timkaechele Thank you very much for your first Contribution 🎉

The change in general looks great. I added some requests to make the code more stable in the future.

@@ -10,7 +10,7 @@ def icalendar(*events)
item.dtstart = event.date
item.dtend = event.end_date
item.url = event_url(event)
item.location = event.location.name if event.location
item.location = event.location.calendar_event_address if event.location
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To ensure that this feature will work in the future when the code base changes. Could you please add a test for this?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need explicit tests for this or would the smoke testing in the events controller specs surfice, given that we already have the calendar event address test?

@@ -30,6 +30,14 @@ def address
"#{street} #{house_number}, #{zip} #{city}"
end

def calendar_event_address
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To ensure that this feature will work in the future when the code base changes. Could you please add a test for this?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When possible include the full address of the event's location in
the ical event instead of just the location name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants