Closed (fixed)
Project:
Translation Management Tool
Version:
8.x-1.x-dev
Component:
Core
Priority:
Major
Category:
Bug report
Assigned:
Reporter:
Created:
27 Mar 2016 at 23:57 UTC
Updated:
19 Nov 2021 at 06:49 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
tduong commentedComment #3
tduong commentedEdited Job::preSave() check, added test, small refactoring.
Screenshots:
Comment #4
berdirThat's not the idea. reject should not set it to active. only active should.
You need to resubmit the same job in the test.
First try with reject, that will change the status to rejected. check that status is reject and inactive. Then submit the same job again, this time with submit. Then check that job and item is active.
It would be a lot faster if we could do this through the API, for example in TmgmtCrudTest. set $job->translator and $job->settings['action'] (I think), then requestTranslation().
Comment #6
tduong commentedRestarted as suggested above: changed fix and rewrote test, thus no interdiff.
Screenshots to see the job/job item states of the test's steps:
Comment #8
tduong commentedAfter discussion with @Berdir, moved the test to
tmgmt/tests/src/Kernel/CrudTest.phpand improved it (for performance/complexity reason).Comment #9
berdirBe careful with unrelated fixes. You risk that your patch conflicts with others that might be changing those lines as well for another reason. Only fix coding standards and documentation in lines that you touch anyway.
Test looks good now. Was confused why you added the use, the problem was actually something else, the namespace was wrong. Fixed and committed:
Comment #11
tduong commentedAbout the unrelated fixed: ok! :)
About the namespace: why is it
Drupal\Tests\tmgmt\Kernel? Is there something special for kernel folders / Unit tests ?I'm confused how the test_only patch could pass, and why this is fine since you have committed it :/
Comment #13
jansi.n commentedBelow section details the steps of how for a rejected job, even if we succeed from memsource provider the job status doesn’t change to inprogress as expected. We are using TMGMT 8.1.12. Can you suggest if you can assist with a patch for this version to fix our issue?
Thanks!
Steps followed to replicate issue:

1. While creating Jobs and sending to memsource, we encountered that the jobs were “rejected”. The status of Job was set as Rejected.
2. On resending the same job, the Job was accepted by Memsource, the accepted ID was recorded in the log of the specified Job.
3. Though the Job was successfully submitted to memsource, the job status continued to be as “rejected”.

4. Completed the translation of this Job in Memsource
5. Unable to pull the translations back from memsource as the Job was in “rejected” state