Reporting: (Historical) Status Change of Workitems

Description
PatrickClaus
Posts: 8
Joined: Thu Jan 18, 2018 11:02 am
Location: Frauenauracher Str. 85, 91056 Erlangen

Reporting: (Historical) Status Change of Workitems

Postby PatrickClaus » Thu Jan 18, 2018 11:37 am

Hello everyone,

I am one of the administrators for Polarion @ Valeo Siemens Erlangen, and I am at the moment tasked with several reporting and quality management services for customer projects.

I would like to propose a general question:
At the moment, we have the need for certain queries and report-widgets/scripts, which are able to depict workitems that had their status changed in a certain time frame.

For example:
I'd like to show all workitems in the last 7-30 days which transitioned from a status "Approved" to "Sent to Customer", e.g. This means that there should be some historical query process, which examines modifications to the status attribute of the workitem in this specified time period.
While not inherently neccessary, filtering of such workitems would help in certain report cases.

Is there any feasible way to achieve this, either by Velocity/Lucene or SQL-queries?
Or are there any existing report widgets / extensions that I have missed?

I would be glad for any feedback regarding this topic.
Best Regards,
Patrick Claus

External service provider at Valeo Siemens eAutomotive GmbH
Frauenauracher Str. 85
91056 Erlangen, Germany
Mail Address

ALMighty
Posts: 80
Joined: Wed Apr 27, 2016 10:34 am
Location: Austria

Re: Reporting: (Historical) Status Change of Workitems

Postby ALMighty » Sun Jan 21, 2018 2:32 pm

PatrickClaus wrote:Is there any feasible way to achieve this, either by Velocity/Lucene or SQL-queries?


I think there is a way to write some Velocity code for this in a Wikipage. Though I think there are possibilities to include Velocity code Widgets or other options, I would try out the wiki pages for testing purposes at first.
If wik pages do not fulfill your needs because e.g. they are not shiny enough, then you could try to run the code to somewhere else.

Where to start?

I can tell you only some shallow details now because I have not my system with my Polarion at my disposal (it is Sunday after all, no work day usually here in Europe).

The first thing I would go for is to getting the DiffManager to generate Histories for a object.

With this code you can get the Diffmanager in a wiki page:

Code: Select all

#set($diffManager = $trackerService.getDataService().getDiffManager())


In the Diffmanager, you have the method generateHistory(), which needs a PObject as aparameter (a PObject can represent basically anything with an URI in Polarion, work items included), fetching PObjects can be done with methods of the DataManager, like sqlSearch().

Check my answer in the thread SQL query example for workitems in a plan. There I listed how to execute SQL queries in wikipages (if you want to use the sqlSearch() method/function).

Also, check the Javadoc of the DiffManager.

Maybe my hints help, tell me if you have a update on this or a result (or if you achieved no result).

Note: In my opinion the easiest way is to have a Java programme cycling through the history, there is an formidable Java SOAP API for Polarion. I can tell you more about that if you want, especially about details how to set up such a Java project in Eclipse.
---------------------------------------------------------------------------------------------------
Playing a good game is never lame. :D
Image

PatrickClaus
Posts: 8
Joined: Thu Jan 18, 2018 11:02 am
Location: Frauenauracher Str. 85, 91056 Erlangen

Re: Reporting: (Historical) Status Change of Workitems

Postby PatrickClaus » Tue Jan 23, 2018 10:05 am

Hey there,

many thanks for your reply, and also for your PM. (I can not respond to that directly, as I'm a newly registered user, which is...kinda strange..)

I will look into the snippets and information provided here, and figure out if I can customize some solution, given the appropriate free time for doing so.

Will be back with an update to this, hopefully sometime soon.
Best Regards,
Patrick Claus

External service provider at Valeo Siemens eAutomotive GmbH
Frauenauracher Str. 85
91056 Erlangen, Germany
Mail Address

dejavu030507
Posts: 3
Joined: Mon Apr 16, 2018 6:42 am

Re: Reporting: (Historical) Status Change of Workitems

Postby dejavu030507 » Wed Apr 18, 2018 8:49 am

Hello,

I have tried to implement generateHistory() method in my wikipage. However, it shows nothing. Could you please review the code below:

#set ($projectID = $page.project)
#set ($project = $trackerService.getTrackerProject($projectID))

{parameter:type1|type=enum:workitem-type|multi=false|value=systemRequirement|allow-no-value=false}

#set ($wiType1 = $pageParameters.getAsString("type1"))
#set($dataService = $trackerService.getDataService())
#set($diffManager = $trackerService.getDataService().getDiffManager())

#set ($sqlAllItems="select WORKITEM.C_URI from WORKITEM inner join PROJECT on WORKITEM.FK_URI_PROJECT = PROJECT.C_URI")
#set ($sqlAllItems="$sqlAllItems where true and PROJECT.C_ID = '$projectID' and WORKITEM.C_TYPE = '$wiType1'")
#set ($all_items = $dataService.sqlSearch($sqlAllItems))

#set($ignoredList = ["feature", "component"])

#foreach ($w1 in $all_items)
#set ($changes = $diffManager.generateHistory($w1, $ignoredList))

#foreach ($change in $changes)
$change.getTime()
#end
#end

Many thanks.


Return to “Polarion Application Lifecycle Management (ALM)”

Who is online

Users browsing this forum: No registered users and 11 guests