The chat responses are generated using Generative AI technology for intuitive search and may not be entirely accurate. They are not intended as professional advice. For full details, including our use rights, privacy practices and potential export control restrictions, please refer to our Generative AI Service Privacy Information. As this is a test version, please let us know if something irritating comes up. Like you get recommended a chocolate fudge ice cream instead of an energy managing application. If that occurs, please use the feedback button in our contact form!
Skip to content

Examples

2612

Every example is a standalone project; download its source archive below. Each builds with npm install && npm run package into an upload-ready ZIP, and each page shows the full source with explanations. The first four teach the basics one step at a time; the other three show what you can build with them.

Learn the basics

Start here. Each example adds one capability to the previous one, from a page that only shows text to a view with its own server-side endpoints.

ExampleView typeAddsTalks to
Hello PolarionForm extensionThe smallest possible application: a manifest, a page and the packagingnothing
Application contextForm extension + sidebar + navigation topicThe SDK, and what the context contains in each placement, from one buildSDK
Selection sidebarSidebarFollowing the selection with events; REST API queries; iconsSDK events, REST API (query)
Traceability with endpointsForm extension + endpointsYour own server-side endpoints: a link tree computed on the server, and a POST that writesSDK, your own endpoints (GET, POST)

What you can build

Larger applications that combine the basics into something a team would use.

ExampleView typeShowsTalks to
Work item cardForm extensionReading a work item and its links; renaming it, changing its status, adding a commentSDK, REST API (GET, PATCH, POST)
Project dashboardNavigation topicA full page with a query box, tiles, charts by status, type and assignee, and a tableSDK, REST API (list, relationships)
Release checklistSidebar + endpointsValidation of the selection by server-side rules; bulk assignment through a writing endpointSDK events, your own endpoints (POST, POST)

Downloads

Each example is available as an application package (upload it as it is in Global Administration → Applications) and as the source project (unzip, npm install, npm run package).

ExampleIdentifierVersionApplication packageSource project
Hello Polarioncom.example.hello0.2.0com.example.hello.ziphello-polarion-source.zip
Application contextcom.example.context0.2.0com.example.context.zipapplication-context-source.zip
Selection sidebarcom.example.selectionsidebar0.1.1com.example.selectionsidebar.zipselection-sidebar-source.zip
Traceability with endpointscom.example.traceability0.2.2com.example.traceability.ziptraceability-source.zip
Work item cardcom.example.workitemcard0.2.1com.example.workitemcard.zipwork-item-card-source.zip
Project dashboardcom.example.dashboard0.2.1com.example.dashboard.zipproject-dashboard-source.zip
Release checklistcom.example.releasechecklist0.2.2com.example.releasechecklist.ziprelease-checklist-source.zip

The packages are the ones used for the screenshots in this guide. The source archives exclude node_modules; the SDK is installed from the vendored tarball on npm install, or replace it with your server's URL (see Install the SDK).

Common structure

All examples share the layout from Set up the project: Vite + React + TypeScript, manifest.json at the root, scripts/package.mjs for the ZIP, in the examples that call Polarion a src/polarion.ts with restFetch for REST API calls or endpointFetch for calls to the application's own endpoints, and the SDK installed from a vendored tarball in examples/_sdk/.

  • examples/
    • _sdk/
      • polarion-app-sdk-0.5.2-preview.tgz
    • hello-polarion/
    • application-context/
    • work-item-card/
    • selection-sidebar/
    • project-dashboard/
    • traceability/
    • release-checklist/

To use an example as the starting point of your own application:

  1. Copy the folder.
  2. Change identifier, title and publisherName in manifest.json.
  3. Replace the SDK dependency with the URL of your server: npm install https://<host>/polarion/sdk/applications/polarion-app-sdk-0.5.2-preview.tgz.
  4. npm run package, upload, place the view.

Trying them on a test server

Upload all seven; they use different identifiers and do not interfere. Then:

  • add <applicationView id="com.example.hello.hello" label="Hello Polarion" height="320px"/>, <applicationView id="com.example.context.form" label="Application context" height="460px"/>, <applicationView id="com.example.workitemcard.card" label="Work item card" height="640px"/> and <applicationView id="com.example.traceability.tree" label="Traceability" height="480px"/> to the form layout of a work item type;
  • add <applicationView id="com.example.dashboard.dashboard"/> and <applicationView id="com.example.context.topic"/> to the project's Topics configuration;
  • open the Work Items table and pick Application context, Selection inspector or Release checklist from Show Sidebar.