Wiki script - Access documents status (enum type)

Description
Salmolin
Posts: 7
Joined: Mon Sep 21, 2015 5:54 am

Wiki script - Access documents status (enum type)

Postby Salmolin » Wed May 10, 2017 8:10 am

I would like to access an Enumeration who is set in the document properties representing the status of the document such as "draft" "in review" and so on...

I already have the document node ($doc) with this expression:

Code: Select all

#set($project = $projectService.getProject($page.getProject()))
#set($docsLocation = $project.location.getLocation("SPACE_NAME"))
#set($docs = $trackerService.moduleManager.getModules($project,$docsLocation))
#foreach($doc in $docs)
  ...
#end


How can I now access to the "Status" of the document?

If i simply write $doc.getStatus(), it returns

Code: Select all

EnumOptionenumId=documents/document-status,id=inReview
but I would like to have only the expression "inReview" in this example.

Thank you.

bschorre
Posts: 25
Joined: Mon Aug 14, 2006 10:20 am
Location: Loehne, Germany

Re: Wiki script - Access documents status (enum type)

Postby bschorre » Wed Jun 07, 2017 7:38 am

It's the same to me. How does it work?

MarcelZimmermann
Posts: 1
Joined: Thu Jun 08, 2017 8:38 am

Re: Wiki script - Access documents status (enum type)

Postby MarcelZimmermann » Thu Jun 08, 2017 11:05 am

Hi,

have you tried $doc.getStatus().getName()?

Regards
Marcel


Return to “Polarion Application Lifecycle Management (ALM)”

Who is online

Users browsing this forum: Google [Bot] and 2 guests