Powirb: Polarion WorkItems handling with Ruby

(10.04.2011)

Working for a while with an ALM product like Polarion I’ve found myself - and my coworkers - in the common situation to merge/migrate data from a tool to another. More commonly it is simply the process that evolves - and work items definition, workflow, condition - with it.

So if you want to support your internal process with any sort of tool - and Polarion is just one of them - you have to be prepared (sometime) to some sort of live data migration, tuning and adjustment.

For such things in Polarion we’ve found that provided web service are not always the best thing to use - simply put: you can’t change everything you want… but you need. :-)

So I’ve released Powirb (as well as Place some time ago) a Ruby library to manipulate work items with a deep details.

Here you have a little example. Suppose after importing a large set of workitems from another tool you need to properly set an “author”:

#!/usr/bin/env ruby

require 'rubygems'
require 'powirb'

Powirb.set_logger(:warn)

h = Powirb::Handler.new('./you_project_working_dir')

h.workitems.each do |wi|
  if  wi[:type] == 'action'
    wi[:author] = 'joe'
    wi.save!
  end
end


Comments

(Comments)
blog comments powered by Disqus