PEATEngine getAssetQuestionsByType issue


#1

Hi all,
we are having a strange behaviour on the PEATEngine type. In particular getAssetQuestionsByType function deosn’t return the “userAnswer” member in the result json. I’m working on Claradomus 7.8 upgrade and in 7.6 it’s working.

Example:
if I call
c3Grid(AssetAnswer.fetch({filter:"source.id=='0049248-001'",include:"this,source",explain:true}))

I have

But if I call
PEATEngine.getAssetQuestionsByType(["Basic Profile","Progressive Profile"],{id:"0049248-001"},"enterprise")
I don’t have the userAnswer member:

This causes multiple issues in the application. In fact every time it’s needed to call PEATEngine function we don’t have the user answer.

Thanks in advance


#2

I cannot be certain without seeing your code, but I would guess that the object being returned in your getAssetQuestionsByType .js function does not contain the userAnswer field.

You can probably resolve this by looking at the point in the javascript where you are pinging the database for the ‘0049248-001’ instance of your type and make sure that you explicitly ‘include’ the userAnswer field during that fetch() or get().


#3

getAssetQuestionsByType is not my code. I have no code to post, I’m simply launching commands on the console. It’s a method contained in PEATEngine object. Moreover the definition is not visible by console. This is probably server side function.

Thanks however.