Auto accept finished translations leaves Job In Progress

Created on 19 January 2023, almost 2 years ago
Updated 25 July 2023, over 1 year ago

Problem/Motivation

When "Auto accept finished translations" is checked on the TranslatorForm, after requesting a translation, its Job's state is left marked as In Progress.

Steps to reproduce

  1. Edit the TranslationForm at /admin/tmgmt/translators/manage/google.
  2. Check "Auto accept finished translations". Save.
  3. Request a translation for a piece of content (eg, from /admin/tmgmt/sources -- select a piece of content, choose a target language and click "Request translation")
  4. View the Jobs overview at /admin/tmgmt/jobs.
  5. See that the Job state is In Progress (and not Finished).

This has been confirmed using both tmgmt_google and tmgmt_microsoft.

Proposed resolution

Mark the job finished in the batch job when auto accept is active.

πŸ› Bug report
Status

Needs review

Version

1.0

Component

Core

Created by

πŸ‡¨πŸ‡¦Canada ezeedub

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 9.5.x + Environment: PHP 7.3 & MySQL 8
    last update over 1 year ago
    117 pass
  • πŸ‡ΉπŸ‡­Thailand AlfTheCat

    very grateful for this patch! Applied cleanly to the latest dev and solved the issue.

  • Status changed to Needs work 7 months ago
  • πŸ‡¬πŸ‡§United Kingdom matt b

    Applied the patch and ran an auto accept job, it's still showing as open. I also need to clear down all the other auto accepted jobs.

  • πŸ‡ΊπŸ‡ΈUnited States scotwith1t Birmingham, AL

    Patch worked for me. +1 for RTBC unless this is just the wrong approach somehow?

    For jobs that got stuck in "In Progress", I just ran drush sqlq "UPDATE tmgmt_job SET status=5;" to set every job in the table to "STATE_FINISHED" but you could modify that query to suit your needs.

Production build 0.71.5 2024