CoreBOSBB
My module is showing 'undefined' in the operator list - Printable Version

+- CoreBOSBB (https://discussions.corebos.org)
+-- Forum: Development (https://discussions.corebos.org/forumdisplay.php?fid=18)
+--- Forum: coreBOS Development (https://discussions.corebos.org/forumdisplay.php?fid=4)
+--- Thread: My module is showing 'undefined' in the operator list (/showthread.php?tid=528)



My module is showing 'undefined' in the operator list - Guido1982 - 12-13-2016

I'm creating a new module, that is related to both Assets and SalesOrders through UI 10 fields. When I want to setup a workflow for my module, that filters on the productname in assets, I see 'is', 'is not' and four times 'undefined' (see attached image). Also, the workflow is not working.


RE: My module is showing 'undefined' in the operator list - joebordes - 12-13-2016

Review the javascript errors and correctly translate the include/js/nl_nl.lang.js, you are missing labels.
As usual send a PR with the updated translation


RE: My module is showing 'undefined' in the operator list - Guido1982 - 12-14-2016

Hm, I tried setting my system to English to find out what the values were supposed to be (so I would know where to look for), but still they remained 'undefined'. No JS console errors as well. I'm not 100% sure this is a language string issue, but if it is, I've no idea what to translate.

PHP Code:
<select id="save_condition_0_operation" class="operation"><option value="is">is</option><option value="is not">is not</option><option value="has changed to">undefined</option><option value="is empty">undefined</option><option value="is not empty">undefined</option><option value="exists">undefined</option></select

Is the HTML source, but exactly these labels work fine when selecting a different field to sort on.

In this case I'm checking the asset name of the asset I related through a UI 10 field. Apart from the 'undefined' stuff, the workflow that should select an option from a dropdown depending on the asset's product name is not working. It is however working when I select a different field from the asset (description for example).


RE: My module is showing 'undefined' in the operator list - joebordes - 12-14-2016

You are correct. I can reproduce this in my development install.
I'll have a look as soon as I can and get back to you


RE: My module is showing 'undefined' in the operator list - joebordes - 12-14-2016

Got it:

https://github.com/tsolucio/corebos/commit/def0607c5e36b0290ee25107067a4124abb4c39a

I created a workflow and tested all the options, they are working correctly.

Thanks!


RE: My module is showing 'undefined' in the operator list - Guido1982 - 12-14-2016

Cool, thanks!