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-9937: Make sure removed job listings are not published #617

Merged
merged 5 commits into from
Dec 3, 2024

Conversation

hyrsky
Copy link
Contributor

@hyrsky hyrsky commented Dec 2, 2024

UHF-9937

What was done

helfi_rekry_jobs:changed migration does not work that well for removed job listings. For context, the helfi_rekry_jobs:changed migraton uses timestamp query parameter in a Helbit API URL to list all job listings that have changed since the timestamp. The timestamp comes from -1 day in the migration source plugin. However, this query shows a job listing HELBIT-01-17-24, which is not visible without the timestamp query parameters, since it was deleted between 12:00 - 13:00.

So, if a job listing is deleted, helfi_rekry_jobs:changed will return invalid data for at least a day. I thought that it would be best just to not use the changed migration at all.

Also, job listings are marked unpublished when they disappear from the helfi_rekry_jobs:all migration. This is detected with a MigrateMissingSourceRowsEvent event handler. The event handler does not take into account job listings that are currently unpublished, but are scheduled to be published later.

How to install

  • Make sure your instance is up and running on correct branch.
    • git checkout UHF-9937-removed-job-listings
    • make fresh
  • Run make 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

Copy link
Contributor

@jeremysteerio jeremysteerio left a comment

Choose a reason for hiding this comment

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

Since running the helfi_rekry_jobs migration is moved out of migrate-job-listings.sh, should we change names of the script files to reflect what's going on better?

Also might be worthwhile to strip changed derivative from HelbitMigrationDeriver file.

@hyrsky hyrsky force-pushed the UHF-9937-removed-job-listings branch 4 times, most recently from 97721e8 to ba24170 Compare December 2, 2024 14:17
@hyrsky hyrsky force-pushed the UHF-9937-removed-job-listings branch from ba24170 to 598cd03 Compare December 2, 2024 14:21
@hyrsky hyrsky merged commit f712991 into dev Dec 3, 2024
1 check passed
@hyrsky hyrsky deleted the UHF-9937-removed-job-listings branch December 3, 2024 07:01
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