nextcloud / nextcloud/calendar

Introduce `room-location` as standard property for rooms for resource providers

Open
#8,735 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. to triage enhancement Feature: Rooms and Resources
Dominant language
JavaScript
Stars
1.2k
Forks
332
Avg merge
16h 13m
Merged PRs (30d)
137

Description

Is your feature request related to a problem? Please describe.

Similar to #8734

Current behaviour
  • Given
    • A event that is edited
    • Location of the event is not set
    • A room
  • When
    • Adding the room to the event
  • Then
    • The location of the event is automatically updated with a room address

As the location, currently the derived value roomAddress (e.g. 201, Second floor, Testweg 23, 12345 Berlin, Germany) is used.
It the concation of roomBuildingRoomNumber (e.g. 201), roomBuildingStory (e.g. "Second floor") and roomBuildingAddress (e.g. Testweg 23, 12345 Berlin, Germany)

https://github.com/nextcloud/cdav-library/blob/0e1a08573ed05340fe6c0b592976fe3feeb983f1/src/models/principal.js#L117-L128

Problem

Our roomAddress is not a "good" location. What a "good" location can depend on language/locale and a custom preferences/needs of an organization (e.g. local school vs international cooperation)

  1. Our simple string concatenation cannot be adapted for all languages/locales
  1. Probably even one locale has not one fixed rule for creating building addresses
    • e.g. Some might add a building name to the room address
      • but some might not because the address is unique enough
    • e.g Some might add the story/floor
      • but some might leave it out because it is encoded in the room number
    • e.g. Usually the country can be excluded because it clear from context
    • e.g. Sometimes only a room number might be enough if the building is clear from context
Describe the solution you'd like

Introduce room-location as standard property for rooms for resource providers (similar to #8734).

Describe alternatives you've considered
  1. Use a localization string with placeholders like t('calendar', '{roomBuildingAddress}, {roomBuildingStory} (Room {roomBuildingRoomNumber}', ...).
  2. Introduce room-location as standard property for rooms for resource providers (similar to #8734) and use localization string like in (1.) as fallback.

(1.) solves problem with localization, but not with custom preferences/needs of organizations.
(2.) Sounds good. But I'd like to keep in simple.

If desired, automation like in (2.) can be provided by an editor extension in the future (see https://github.com/nextcloud/calendar/issues/8522).

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the referenced cdav-library principal.js section around lines 117-128 and compare the related work in issues #8734 and #8522. Trace where roomAddress is consumed in the calendar app and define how the standard room-location property and its fallback should work. Done means resource-provider rooms expose room-location and event locations use it without relying only on the derived roomAddress.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api, backend-api-design
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.