SVN in WikiContent

Description
Kakaomonster
Posts: 4
Joined: Fri May 18, 2018 9:08 am

SVN in WikiContent

Postby Kakaomonster » Thu May 24, 2018 6:09 am

Hello together,

I have a big problem to show a field in a table from WikiContent.
With the following code I have my table:

Code: Select all

{pages:@all|sortby=title|fields=title,space,revision,updated,updatedBy|display=table}


All fields are ok - but not the field "revision" I test also "svn" and some other, but I can't get the revison number from the document. Can someone give me a hint?

Thanks, Ralf

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

Re: SVN in WikiContent

Postby Jürgen » Wed May 30, 2018 12:25 pm

Hi, Ralf

I think the reason that it is not displayed is that revision is not a field of the document. The wiki help for "pages" says, that only certain fields are possible here (in our Polarion version: name, title, project, space, updated, created, updatedby, createdby).

So I don't think it is possible to get the revision with that macro.

Jürgen

SaoBit
Posts: 8
Joined: Tue May 12, 2015 8:02 am

Re: SVN in WikiContent

Postby SaoBit » Fri Jun 01, 2018 11:56 am

Hello Ralf,

you don't get this information with the {pages} command. But you can try the following code:

Code: Select all

#set($pages = $trackerService.getDataService().searchInstances("RichPage", "", "id"))
<table>
  <tr>
    <th>title</th>
    <th>space</th>
    <th>revision</th>
    <th>updated</th>
    <th>updatedBy</th>
  </tr>
#foreach($page in $pages)
  <tr>
    <td>$page.getTitle()</td>
    <td>$page.getSpaceId()</td>
    <td>$page.getLastRevision()</td>
    <td>$page.getUpdated()</td>
    <td>$page.getUpdatedBy().getLabel()</td>
  </tr>
#end
</table


The empty string in the first line is the search filter, the first parameter ("RichPage") is the prototype. To get every page, you have to do this again for other prototypes (Document, WikiPage). The fields are not formatted properly but give you the necessary hints to get it done.

Look at the Polarion API, especially there:
https://almdemo.polarion.com/polarion/s ... ng.String-
https://almdemo.polarion.com/polarion/s ... hPage.html

Kakaomonster
Posts: 4
Joined: Fri May 18, 2018 9:08 am

Re: SVN in WikiContent

Postby Kakaomonster » Wed Jun 06, 2018 8:45 am

Hello SaoBit,

thanks for your hint and the others for the help. I was some days not here this is why my answer is so late.

I will tested it directly,
thanks a lot, Ralf


Return to “Polarion Application Lifecycle Management (ALM)”

Who is online

Users browsing this forum: No registered users and 7 guests