-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[68582] Represent Meetings duration as ISO8601 #22753
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -55,7 +55,11 @@ class MeetingRepresenter < ::API::Decorators::Single | |||||
| date_time_property :start_time | ||||||
| date_time_property :end_time | ||||||
|
|
||||||
| property :duration | ||||||
| property :duration, | ||||||
| exec_context: :decorator, | ||||||
| getter: ->(*) do | ||||||
| datetime_formatter.format_duration_from_hours(represented.duration) | ||||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here, I’m not sure if I should The model validates the presence through
But the database allows
Should I rely on model validation and not I prefer (and implemented) the first option to prevent silently handling (but hiding) inconsistent data. |
||||||
| end | ||||||
|
|
||||||
| associated_resource :author, | ||||||
| v3_path: :user, | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a breaking change. Is there any way to "warn" about it?
I hesitated about adding a field (e.g.
durationIso8601) instead of changing its current behaviour. Whas’s the usual policy here?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was also concerned about that. I think we have two options:
In any case, we can mention it in the release notes, which are managed in this repo as well.
You can already optimistically create release notes for the version that this is part of.
What I would do: