Making WordPress.org

Opened 6 years ago

Closed 5 years ago

#4319 closed enhancement (wontfix)

Central: End date is empty

Reported by: casiepa's profile casiepa Owned by:
Milestone: Priority: normal
Component: WordCamp Site & Plugins Keywords:
Cc:

Description

In about 20% of the cases it seems that the field 'End Date (YYYY-mm-dd)' for a WordCamp is empty in the API on https://central.wordcamp.org/wp-json/wp/v2/wordcamps

I assume that it means that the WordCamp is only 1 day?

I would propose to fill the End Date with the same value of the Start Date in this case.

Change History (8)

#1 @dd32
6 years ago

Just to confirm, yes, if it doesn't have an end-date it's a single-day event.

In the backend, the start date (Day 1) is required, and end date is optional, but set for multi-day WordCamps.

#2 follow-up: @casiepa
6 years ago

@dd32 What do you think, should the API get the start date into the end date field in this case? Or is it better to leave it empty? I don't like empty fields, but I already programmed around it, so no problem for me now. However I think fields in the API should be filled where it's clear what needs to go in it.

#3 in reply to: ↑ 2 ; follow-up: @dd32
6 years ago

Replying to casiepa:

@dd32 What do you think, should the API get the start date into the end date field in this case? Or is it better to leave it empty? I don't like empty fields, but I already programmed around it, so no problem for me now. However I think fields in the API should be filled where it's clear what needs to go in it.

As "not the team who decides" I wouldn't bother changing anything here personally, I also bet there's a bunch of stuff that uses those data points as the "how many days is this event".

#4 in reply to: ↑ 3 @andreamiddleton
6 years ago

Replying to dd32:

As "not the team who decides" I wouldn't bother changing anything here personally, I also bet there's a bunch of stuff that uses those data points as the "how many days is this event".

Dion is right -- there are 2-3 places I can think of that populate a "number of days of event" from that start date/end date math. :)

#5 @casiepa
6 years ago

Well, all maths are probably:
If enddate is filled, do enddate minus startdate plus 1 to get the number of days
If enddate is not filled, number of day is 1

So if enddate is filled with the same value for a 1day WC, all math everywhere already work as some WCs already fill it that way in the interface:
"Start Date (YYYY-mm-dd)":"1541808000","End Date (YYYY-mm-dd)":"1541808000","Location":"Islamabad"

I'm just for unnecessary calculations as a programmer, but if you think it's not worth the effort, just close as WontFix. I won't feel bad about it ;-)

#6 @iandunn
6 years ago

Related #4637

This ticket was mentioned in Slack in #meta-wordcamp by ryelle. View the logs.


5 years ago

#8 @ryelle
5 years ago

  • Resolution set to wontfix
  • Status changed from new to closed

As said above, this change isn't causing a problem that's worth the effort to fix it.

Note: See TracTickets for help on using tickets.