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-11306: hakuvahti fixes #1162

Merged
merged 2 commits into from
Jan 21, 2025
Merged

UHF-11306: hakuvahti fixes #1162

merged 2 commits into from
Jan 21, 2025

Conversation

hyrsky
Copy link
Contributor

@hyrsky hyrsky commented Jan 17, 2025

UHF-11306

What was done

Hakuvahti is not shown if any job advert has field_promoted set to true due to logic in ResultsContainer.tsx.

This change refactors results container so that there is only one component for displaying results instead of two that are mostly similar. The actual logic that needs to be different was split into useResultsQuery().

How to install

  • Make sure your rekry is up and running on latest dev branch.
    • git pull origin dev
    • make fresh
  • Update the HDBT theme
    • composer require drupal/hdbt:dev-UHF-11306-hakuvahti-fixes
  • Run make drush-cr

How to test

  • Ensure that all job adverts have field_promoted set to false:
    drush sql:q "SELECT COUNT(*) FROM node__field_promoted WHERE bundle = 'job_listing' AND field_promoted_value <> 0;"
    (Find and remove if the query returns anything but zero).
  • Ensure elasticsearch is up to date: drush sapi-rt; drush sapi-c; drush sapi-i
  • Check that job search works as expected, hakuvahti form is not hidden.
  • Set at least one job advert to promoted, run drush sapi-i.
  • Check that job search works as expected, hakuvahti form is not hidden.
  • Check that code follows our standards

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 pull requests

Copy link

⚠️ Visual regression found! Please check if this change is wanted or accidental. You can check the output here: https://city-of-helsinki.github.io/drupal-hdbt-visual-regression/pull/1162/html_report/

Copy link
Contributor

@teroelonen teroelonen left a comment

Choose a reason for hiding this comment

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

This works nicely 🦖

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.

2 participants