-
Notifications
You must be signed in to change notification settings - Fork 69
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
Transparency Report email automation #1290
Transparency Report email automation #1290
Conversation
* The "Transparency Report Received" checkbox can only be checked or unchecked when the current user is admin or super admin. | ||
* See https://github.com/WordPress/wordcamp.org/issues/1280#issuecomment-2058571557. | ||
*/ | ||
if ( current_user_can( 'manage_options' ) ) { |
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.
Not sure if you've tested this scenario but I've come across several times in the past where a user who isn't shown or displayed a field in this way can overwrite the field with a default value. Unsure if this is the case here, but wanted to mention it.
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.
Thanks for bringing that up! I hadn't thought of that case.
Just checked off the field and then updated the post using another user unable to see the checkbox, and it didn't overwrite.
Fixes #1280
This PR adds a checkbox for admins and super admins to check to confirm whether the transparency report has been received. And integrates with the organizer reminder plugin, allowing users to set how many days after a camp ends a reminder email should be sent if the report has not been received.
How to test the changes in this Pull Request:
organizing team (typically city@wordcamp.org)
&The Budget Wrangler
.7
days &14 days
&21 days
.start date
,end date
, andthe Budget Wrangler's email address
; these can be entered arbitrarily. Also, fill in theURL
and check thecreate a new site
checkbox. Then Publish.Transparency Report Received
checkbox at the bottom of the WordCamp Information section.super admin
and anadmin+wordcamp
author can see the checkbox. (ie. make sure awordcamp author
can't see the checkbox)Need Vetting
toIn Pre-Planning
.End Date
is NOT set to 7 days ago. Then, runwp cron event run wcor_send_timed_emails --url=https://central.wordcamp.test/
in your docker container.End Date
of the second WordCamp for 7, 14, or 21 days; leave it for future testing.End Date
to 7 days ago and runwp cron event run wcor_send_timed_emails --url=https://central.wordcamp.test/
again.End Date
to 14 days and 21 days ago respectively and runwp cron event run wcor_send_timed_emails --url=https://central.wordcamp.test/
again.End Date
to 7 days ago. Then, runwp cron event run wcor_send_timed_emails --url=https://central.wordcamp.test/
in your docker container.Transparency Report Received
checkbox and set theEnd Date
to 14 days ago. Runwp cron event run wcor_send_timed_emails --url=https://central.wordcamp.test/
Screenshots
Organizer Reminder
![Screenshot 2024-04-23 at 02 20 18](https://private-user-images.githubusercontent.com/18050944/324555691-c6f8a607-720d-450e-8571-ec07e4f001cb.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjUxMjMzNDUsIm5iZiI6MTcyNTEyMzA0NSwicGF0aCI6Ii8xODA1MDk0NC8zMjQ1NTU2OTEtYzZmOGE2MDctNzIwZC00NTBlLTg1NzEtZWMwN2U0ZjAwMWNiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MzElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODMxVDE2NTA0NVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTIwZDY2ZTllMmFhZDFhNmMxZmM2ZGE3MzdhY2Q1MDcwMWY4ZTBhMjRkZTA1NzlmMzk5NzhhNTVjZTA2NjUyZDEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.TArJD1iGw1Ebgvf9aMnKblvwgG16QyTv7_nJK3fcNFU)
Three emails received
![Screenshot 2024-04-23 at 02 19 44](https://private-user-images.githubusercontent.com/18050944/324555683-6af13169-3388-4b61-9417-39ba2f3c9ecf.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjUxMjMzNDUsIm5iZiI6MTcyNTEyMzA0NSwicGF0aCI6Ii8xODA1MDk0NC8zMjQ1NTU2ODMtNmFmMTMxNjktMzM4OC00YjYxLTk0MTctMzliYTJmM2M5ZWNmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MzElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODMxVDE2NTA0NVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTE1NjkyNmVjYmFkMTJlNzhiZDdhZjhmNTlkMTI2OTExOGQ5MDc2ZjU2MjRlNmI5NDc0OGIwYzYyOTc3Njc2YjImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.047Bi9ksuecXg4TohhG8RUiCgAY0swQk9cFyHLByMYs)
Transparency Report Received Checkbox
![Markup on 2024-04-23 at 02:25:43](https://private-user-images.githubusercontent.com/18050944/324555708-93e24a48-ba05-4981-ac98-f621945c0a7b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjUxMjMzNDUsIm5iZiI6MTcyNTEyMzA0NSwicGF0aCI6Ii8xODA1MDk0NC8zMjQ1NTU3MDgtOTNlMjRhNDgtYmEwNS00OTgxLWFjOTgtZjYyMTk0NWMwYTdiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MzElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODMxVDE2NTA0NVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQ4N2IwMGU2NzkzOGFkYzdhYjJhMTJmYWNkZDEzN2RmMzYwMDVhYWRmNmJkMDJhOGJjNWJkZDNiMTliODA1ZmQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.uhwQZRR0rGx7AfXXCx9-AFbVWKyrw_-2CXI_OG2-WZI)
Four emails received
![Screenshot 2024-04-23 at 02 26 59](https://private-user-images.githubusercontent.com/18050944/324555710-0e0b84f0-a912-4713-a606-0a5f47485731.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjUxMjMzNDUsIm5iZiI6MTcyNTEyMzA0NSwicGF0aCI6Ii8xODA1MDk0NC8zMjQ1NTU3MTAtMGUwYjg0ZjAtYTkxMi00NzEzLWE2MDYtMGE1ZjQ3NDg1NzMxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MzElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODMxVDE2NTA0NVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTliNTA1Zjg0YzlhMzhjODg2ZTBiMWQ4NWE2ODljODNhZmY2MmQzNmI3MTZlYWIwMzE2OWYxNTNmYjU3ZGFiMTUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.o7nsQb5NGhPNb1Y7C6C8ahkcneHHGPyDY7dXdLtJl9A)