-
Notifications
You must be signed in to change notification settings - Fork 5
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
UHF-10539: Unpublishable redirects #862
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #862 +/- ##
============================================
+ Coverage 14.49% 17.89% +3.40%
- Complexity 271 285 +14
============================================
Files 33 36 +3
Lines 1035 1084 +49
============================================
+ Hits 150 194 +44
- Misses 885 890 +5 ☔ View full report in Codecov by Sentry. |
Quality Gate passedIssues Measures |
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.
Looks good!
UHF-10539
What was done
The City wants to deactivate automatically made redirects after 6 months. This change alters redirect entity type from
redirect
module so that the entity implementsEntityPublishedInterface
and has fieldis_custom
.The redirect entities added or updated by any user from the entity from are automatically permanently marked as custom, while redirects created automatically are marked not custom. A cron job queries for non-custom redirect entities that are more that 6 months old, and unpublishes them.
How to install
make fresh
composer require drupal/helfi_platform_config:dev-UHF-10539
drush updb -y
drush cr
How to test
drush sqlq "UPDATE redirect SET is_custom = 0"; drush cr
RedirectCleaner
service unpublishes redirects that are older that 6 months:drush php:eval "\Drupal::service(\Drupal\helfi_platform_config\RedirectCleaner::class)->unpublishExpiredRedirects()"
RedirectCleaner::unpublishExpiredRedirects()
is re-run.Continuous documentation
Translations
Other PRs