UCDavisLibrary/main-wp-website

Update the slackbot to include all updates and new pages

Closed this issue · 4 comments

According to Kristin and Kimmy, the current version of the slackbot updates does not include all the updates, nor new page development. Presumably the bot part is pretty simple, and the issue is most certainly with the SQL specification.

@jrmerz assigning you just for pointers to where to look for the problematic SQL, you can remove yourself after providing that.

@spelkey-ucd I've submitted a PR , UCDavisLibrary/main-wp-website-deployment#45 that searches on the posts not the revisions. This should address the concerns about new pages, and all post types. It's more inclusive, and will show things like wp_block changes which I think is good as well.

This is a drop in replacement to the old query. I'd maybe consider some minor changes to the return values, but you'd need to do some more coding in that case.

select post_type,count(*) from wp_posts where post_parent='' group by post_type order by post_type;
+--------------------+----------+
| post_type          | count(*) |
+--------------------+----------+
| attachment         |     2628 |
| collection         |     1158 |
| department         |       17 |
| exhibit            |       79 |
| forminator_forms   |       12 |
| forminator_quizzes |        1 |
| location           |        7 |
| nav_menu_item      |       70 |
| page               |      101 |
| person             |      142 |
| post               |      974 |
| service            |       27 |
| wp_block           |       29 |
| wp_global_styles   |        1 |
+--------------------+----------+

Deployed main-wp-website v3.5.0