We have a new column "Creator" added to Translation manager UI, via GUI extention - to show the name of user who created respective Translation job.
Model.config has:
<cfg:group name="TMOverViewScreen" merger="Tridion.Web.UI.Core.Configuration.Resources.DomainModelProcessor" merge="always">
<cfg:domainmodel name="TMOverView.Override">
<cfg:fileset>
<cfg:file type="script">/Scripts/OverRideTranslationJobList.js</cfg:file>
</cfg:fileset>
<cfg:services>
</cfg:services>
</cfg:domainmodel>
</cfg:group>
Javascript file has:
tridion.TranslationManager.UI.Model.TranslationJobManager.GetTranslationJobs(filter.conditions, mySuccess, failure);
This fires ajax call to get Translationjobs, and then we are processing list of jobs by adding value to new column in "mysuccess" funciton.
This is running fine in 2013sp1, however not working in Web 8.5. The AJAX response is different in two versions:
For 2013sp1, response:
{
"d": [{
"__type": "InvocationResult:#Tridion.Web.UI.Core",
"Body": "{"d":{"__type":"TranslationJobDTO:#Tridion.TranslationManager.UI.Model.Services.DTO","AddedItems":[{"__type":"TranslationJobDTO.AddedItemDTO:#Tridion.TranslationManager.UI.Model.Services.DTO","AccessDenied":false,"Icon":"T16","ItemType":"tcm:16","TcmUri":"tcm:12-26964"
.........
However, in Web8.5, response is:
{
"d": [{
"__type": "InvocationResult:#Tridion.Web.UI.Core",
"Body": "{"d":"<tm:TranslationJob xmlns:xlink=\\"http:\\\/\\\/www.w3.org\\\/1999\\\/xlink\\" xmlns:tm=\\"http:\\\/\\\/www.tridion.com\\\/TranslationManager\\"><tm:ContextPublicationTitle>200 Content Publication<\\\/tm:ContextPublicationTitle><tm:DisplayState>2<\\\/tm:DisplayState><tm:ErrorSeverityLevel>0<\\\/tm:ErrorSeverityLevel><tm:HasError>false<\\\/tm:HasError><tm:Id>8811
.............
Only problem looks here is "Body" element of AJAX response, is in XML in web8.5 - do we have any way to get it in JSON.
Edit1: (solution by reading Creator from XML) I am able to make it work by reading the Creator from XML.
tridion.TranslationManager.UI.Model.TranslationJobManager.Load(tmId,function(job){
parser1=new DOMParser();
parseJobXml=parser1.parseFromString(job,"text/xml");
var jobCreator = parseJobXml.getElementsByTagName("tm:Creator")[0].textContent;
val.setAttribute('User',jobCreator);
}