Bug in script editor?
-
While working on a script, I discovered that not all of it was being saved.
Every time I went to reopen it, it was truncated.
If I enter the following script, it validates just fine:
var sources = DataSourceQuery.query('like(name,polecat*VIRT)&limit(10)'); for(var i = 0; i<sources.size(); i++ ) { var source = sources.get(i); print( source.name ); }
But if I save that script and then reopen it, here is what I find:
var sources = DataSourceQuery.query('like(name,polecat*VIRT)&limit(10)'); for(var i = 0; i
Now if I modify the script slightly, like this:
var sources=DataSourceQuery.query('like(name,polecat*VIRT)&limit(10)'); for(var i=0; i < sources.size(); i++ ) { var source=sources.get(i); print( source.name ); }
...the script opens properly after saving.
What is the difference? It is:
i<sources.size();
...which doesn't save properly, vs:
i < sources.size();
...which does save properly
What a difference a space or two makes! -
Which script editor? New UI or legacy?
-
I think it is the legacy
On my system it appears at http://intranet:8080/data_sources.shtm
-
What version of Mango are you using? Have you tried the new data source UI in 3.6?
-
I haven't tried 3.6 yet. Running the upgrades now.
-
The new data source UI doesn't seem to have the bug.
Thanks!