WordPress.org

Making WordPress.org

Opened 8 months ago

Closed 8 months ago

Last modified 8 months ago

#5404 closed defect (fixed)

Canceled Regional WordCamps are being shown in Dashboard Events widget

Reported by: RMarks Owned by: coreymckrill
Milestone: Priority: normal
Component: Events API Keywords:
Cc:

Description

WordCamp US, a regional WordCamp which was canceled in July, is showing in the WordPress Dashboard Events widget now that we're within two months of the event.

The code should look to see if the status = 'scheduled' before adding it to dashboards.

Reported in Slack in two places:

Attachments (1)

WCUS-events-widget.png (41.4 KB) - added by RMarks 8 months ago.

Download all attachments as: .zip

Change History (6)

#1 @RMarks
8 months ago

It looks like each of the regional WordCamps are hard coded. Here is the code I found for WCUS.
api.wordpress.org/public_html/events/1.0/index.php Line 1037

#2 @coreymckrill
8 months ago

  • Owner set to coreymckrill
  • Status changed from new to assigned

#3 @coreymckrill
8 months ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 10223:

Events API: Remove canceled WCUS from pinned events

Comments out the regional camp data for WCUS. Better not to remove it entirely
since it may be used again next year.

Fixes #5404

#4 @RMarks
8 months ago

@coreymckrill what are your thoughts on automating these three regional WordCamps and how the get_regional_wordcamp_data function works.

Suggestion:

  1. Build an array of regional wordcamp names (asia, europe, us).
  2. For each of these, query for the next WordCamp's info (title, url, date, end_date, location, country, latitude, longitude) where status is scheduled, date is in the future, and url contains the wordcamp's name.
  3. Populate the $events array to produce the same data in place today

For the third where clause condition (url contains the wordcamp's name), is there column in the wporg_events table that is indexed to support this?

#5 @coreymckrill
8 months ago

@RMarks I think we considered something like this a while back. Finding the right WordCamp post via the URL slug is the tricky part. There were some other considerations too, but I'm not remembering right now. Ultimately we decided that when there are only two or three regional camps that get pinned, it's not much effort to go in and update the hard coded data as needed. If we end up with a significantly larger number of these events, it will probably make sense to automate it.

Note: See TracTickets for help on using tickets.