Reference for Wiki Scripting Tools

Description
r.phil
Posts: 12
Joined: Tue Apr 12, 2016 3:17 pm

Reference for Wiki Scripting Tools

Postby r.phil » Wed Jul 22, 2020 6:28 am

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.

micdal
Posts: 30
Joined: Thu Feb 09, 2012 6:22 am

Re: Reference for Wiki Scripting Tools

Postby micdal » Wed Jul 22, 2020 6:48 am

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

r.phil
Posts: 12
Joined: Tue Apr 12, 2016 3:17 pm

Re: Reference for Wiki Scripting Tools

Postby r.phil » Wed Jul 22, 2020 8:06 am

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?

Jürgen
Posts: 100
Joined: Tue Sep 12, 2017 1:02 pm

Re: Reference for Wiki Scripting Tools

Postby Jürgen » Thu Jul 23, 2020 1:19 pm

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/


Return to “Polarion Application Lifecycle Management (ALM)”

Who is online

Users browsing this forum: franciscatz11, kellirl1, selenaop2 and 15 guests