Skip to content
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

Merged
merged 16 commits into from
Dec 10, 2024
Merged

UHF-10539: Unpublishable redirects #862

merged 16 commits into from
Dec 10, 2024

Conversation

hyrsky
Copy link
Contributor

@hyrsky hyrsky commented Dec 5, 2024

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 implements EntityPublishedInterface and has field is_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

Continuous documentation

  • This feature has been documented/the documentation has been updated
  • This change doesn't require updates to the documentation

Translations

  • Translations have been added to .po -files and included in this PR

Other PRs

  • Link to other PR

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 93.61702% with 3 lines in your changes missing coverage. Please review.

Project coverage is 17.89%. Comparing base (6c57a10) to head (950b694).
Report is 67 commits behind head on main.

Files with missing lines Patch % Lines
src/RedirectCleaner.php 89.65% 3 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

Copy link

sonarqubecloud bot commented Dec 9, 2024

@juho-lehmonen juho-lehmonen self-requested a review December 10, 2024 08:24
Copy link
Contributor

@juho-lehmonen juho-lehmonen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants