Update the effective salary of the jobs
If the site setting jobboard.salary.required is enabled (the default), the job list filters the jobs without salary information in the database query. For this, every job stores its effective salary: the lowest and the highest amount that the frontend shows. The values are calculated from the salary mode, the minimum and maximum salary and the valid salary grades and steps of the job, with the same rules as the salary range of the detail view, see Salary tables, salary grades and salary steps.
With this setting enabled, jobs without an effective salary are not listed, and their detail view returns the HTTP status 404 (page not found). With the setting disabled, these jobs are shown like all other open jobs. The effective salary is calculated in both cases, so keep the daily command running either way.
Database columns
The table
tx_ has these columns. Editors
see them read-only at the end of the first tab of a job, in the palette
Effective salary, as a control. They cannot be edited. The
values are updated when the job, a salary grade or a step is saved, and by
the scheduler task.
effective_,salary_ min effective_salary_ max - Lowest and highest amount. A job is listed if one of them is greater
than
0. effective_salary_ valid_ until - Next point in time at which the publish date or expiration date of one
of the salary grades or steps of the job changes the result.
0means that no change is scheduled.
Translations of a job always get the values of the default language.
Look-ahead of 24 hours
A salary grade or step whose expiration date is within the next 24 hours already counts as expired. Jobs that depend on such a grade disappear one day before the grade expires. This gives editors a day to assign the grades of the new pay scale, and a daily recalculation is enough to keep all jobs up to date. A publish date in the future counts from the exact point in time, without look-ahead.
Update on saving records
A DataHandler hook
(
\JWeiland\) recalculates the
affected jobs whenever jobs, salary grades, salary steps or salary tables
are created, changed, hidden, deleted, restored, moved, copied or
localized. This also applies to the job import, which
saves all records with the DataHandler. Changes in a workspace are
calculated when they are published to the live workspace.
The values are written with the DataHandler as well, so
TCEMAIN. of the storage folder clears the cache
of the job board pages, see Clear the cache of the job board pages.
Daily update with the console command
Publish and expiration dates of salary grades and steps take effect
without saving any record. The console command
jobboard: recalculates all jobs whose
effective_ is due within the next 24 hours.
vendor/bin/typo3 jobboard:salary:update
Important
Run this command once a day, preferably at night. Create a task
Execute console commands in the backend module
System > Scheduler (EXT:scheduler), select
jobboard: and set a daily frequency, for example
the cron expression 30 2 * * *. Alternatively, call the command
with a cron job of your server.
The command writes only changed jobs, with the DataHandler. Therefore
TCEMAIN. of the storage folder also applies to
the nightly run.
The option
-- recalculates every job. Run it once after
installing or updating the extension and after migrating records with an
upgrade wizard, see After updating the extension:
vendor/bin/typo3 jobboard:salary:update --all