1

I'm starting to create custom widgets, like adding up the 'remaining time' of some work items and showing that on a live report page for instance. Google and SO helped for this but is there some resource available with examples of the most common Velocity functions etc?

Also trying to use the Polarion parameters like $date, $info and $message to create a live doc page, but I can't find the full list of these variables anywhere.

Thanks

1 Answers1

1

Velocity is a rather simple template programming language and it holds only some variables in its context: see Polarion help, for more details:

  • $calendarTool
  • $me
  • $page
  • $platformService
  • $projectService
  • $securityService
  • $testManagementService
  • $trackerService
  • $transactionService
  • $wikiService

Depending on the location of the invoked script you can have one of the following variables in your context as well:

  • $testRun
  • $document
  • $plan

But most important is the $trackerService as the main entry point to the Polarion API only the API will give you the power to do stuff on the wiki pages (like Traceability Analysis, calculating sums, etc.)

For Plan-pages you can use the newer Rendering API which helps to show fields and links to WIs without messing with too much HTML code

Peter Parker
  • 29,093
  • 5
  • 52
  • 80
  • 1
    Thanks Peter, I just found it hard to find examples sometimes, and the Polarion documentation isn't amazing. – Julien Llanes Nov 10 '22 at 13:10
  • 1
    Totally understand. It gets easier if you know the most important places. Studying the examples in the sdk or in the extensions portal helps to improve the knowledge. The source of the extensions is usually quite short. – Peter Parker Nov 10 '22 at 13:46