Job label is not always saved

Created on 29 April 2025, 3 months ago

Problem/Motivation

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.

Steps to reproduce

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.

Proposed resolution

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;
🐛 Bug report
Status

Active

Version

1.17

Component

Core

Created by

🇮🇳India sumit_saini

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024