Page 1 of 1

Reference for Wiki Scripting Tools

Posted: Wed Jul 22, 2020 6:28 am
by r.phil
Hi!

Does anybody know, where I can get a reference for the "Wiki Scripting Tool" Extension?

Especially: I want to know the parameters of $sortTool

Searched for a while, did not find anything. In the downloaded zip / jar files of the extension, there is no description included.

Re: Reference for Wiki Scripting Tools

Posted: Wed Jul 22, 2020 6:48 am
by micdal
Hi,

unfortunately the links on the extensions page (https://extensions.polarion.com/extensi ... ting-tools) are not valid anymore. But you'll find descriptions to all tools at http://velocity.apache.org/tools/1.4/generic/

Hope that helps.

Regards,
Michael

Re: Reference for Wiki Scripting Tools

Posted: Wed Jul 22, 2020 8:06 am
by r.phil
Thanks Michael,

this helps... a little. I just can't get the Sorter to sort an array of strings descending.

I tried:

Code: Select all

#set($resultList = $sortTool.sort($resultList,"name:desc"))


Or:

Code: Select all

#set($resultList = $sortTool.sort($resultList,"desc"))


The only command that works is:

Code: Select all

#set($resultList = $sortTool.sort($resultList))

But this sorts ascending.

What am I doing wrong here?

Re: Reference for Wiki Scripting Tools

Posted: Thu Jul 23, 2020 1:19 pm
by J├╝rgen
I have only read the Velocity-manual. Your first variant should be correct. But I guess that you can only sort by name, if the objects in your list really have a property "name". If your list only contains pure strings, this will probably not work.

There is a blog post that explains the principle: https://blog.teknkl.com/sorting-objects ... -velocity/