- Issue created by @sumit_saini
- Merge request !108Issue #3521648 by sumit saini: Job label is not always saved → (Open) created by sumit_saini
Job label is a computed value but label is not saved if multiple language translation is requested and submit_all (
Submit all N translation jobs with the same settings) is checked on Job Edit Form.
1. Request translation for a node in multiple languages. For example, an en node's translation is requested in fr and it.
2. In Configure Provider section on the Job edit form, check "Submit all N translation jobs with the same settings" and click on "Submit to provider and continue"
Current: Label is Null for the newly created jobs as the batch process do not compute/save the Job label.
Expected: Label should not be Null for such Jobs.
Saving of label is skipped due to wrong condition in JobForm::buildEntity() method and should be updated as below
@@ -631,8 +631,8 @@ class JobForm extends TmgmtFormBase {
}
// Make sure that we always store a label as it can be a slow operation to
// generate the default label.
- if (empty($job->label)) {
- $job->label = $job->label();
+ if ($job->get('label')->isEmpty()) {
+ $job->set('label', $job->label());
}
return $job;
Active
1.17
Core