UCDavisLibrary / main-wp-website

1 stars 0 forks source link

Update the slackbot to include all updates and new pages #80

Closed qjhart closed 1 year ago

qjhart commented 1 year ago

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.

qjhart commented 1 year ago

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

jrmerz commented 1 year ago

https://github.com/UCDavisLibrary/main-wp-website-deployment/blob/main/utils/monitoring/daily-updates.sql

qjhart commented 1 year ago

@spelkey-ucd I've submitted a PR , https://github.com/UCDavisLibrary/main-wp-website-deployment/pull/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 |
+--------------------+----------+
spelkey-ucd commented 1 year ago

Deployed main-wp-website v3.5.0