Skip to content
Snippets Groups Projects
Commit 276e8c4f authored by Stefan Galinski's avatar Stefan Galinski :video_game:
Browse files

[BUGFIX] Job ID could be missing inside the CSV file

parent 7b863dd8
No related branches found
No related tags found
No related merge requests found
......@@ -425,9 +425,8 @@ class JoblistController extends ActionController {
$newName = \date('Ymd-His') . '_' . $applicationData->getJobId() . '-' . $applicationData->getFirstName()
. '-' . $applicationData->getLastName();
$storage = $resourceFactory->getStorageObject(1);
$applicationFilePath = Environment::getPublicPath() . '/' . $storage->getConfiguration(
)['basePath'] . 'JobApplication/' . $folderName .
'/' . $newName . '.csv';
$applicationFilePath = Environment::getPublicPath() . '/' .
$storage->getConfiguration()['basePath'] . 'JobApplication/' . $folderName . '/' . $newName . '.csv';
$this->writeApplicationFile($applicationData, $applicationFilePath);
}
......@@ -468,6 +467,7 @@ class JoblistController extends ActionController {
try {
$job = $applyData->getJob();
if ($job) {
$applyData->setJobId($job->getJobId());
foreach ($job->getCompanies() as $company) {
/** @var Company $company */
$applyData->setCompany($company);
......@@ -482,9 +482,9 @@ class JoblistController extends ActionController {
}
}
$applyData->setPid($GLOBALS['TSFE']->id);
// look for a configured default job, in case of unsolicited application
if ((!$job || $applyData->getJobId() === NULL) && $applyData->getCompany() !== NULL) {
$applyData->setPid($GLOBALS['TSFE']->id);
if ((!$job || !$applyData->getJobId()) && $applyData->getCompany()) {
$applyData->setJobId($applyData->getCompany()->getJobId());
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment