Polarion Plans

Creating a new plan

A new plan can be created using createPlan(). The template is project dependant, but default are ‘iteration’ and ‘release’.

project.createPlan('New iteration plan!', 'new-plan-1', 'iteration')
project.createPlan('New release plan!', 'new-plan-2', 'release')

Usage

The plan class allows basic access to Plans in polarion.

Note

Note that for modifying plans you need the ALM license in Polarion.

You can get an existing plan or create a new one:

plan = project.getPlan('00002')

The template is project dependant, but default are ‘iteration’ and ‘release’.

plan = project.createPlan('Test plan', '00002', 'iteration')
plan = project.createPlan('Test plan', '00003', 'release')

In this test plan you can then add or remove workitems.

workitem = project.getWorkitem('xxx-000)
plan.addToPlan(workitem)
plan.removeFromPlan(workitem)

If the workitem type is not allowed in the plan, an exception will be raised.

You can however add or remove workitem types to the plan.

workitem = project.getWorkitem('xxx-000)
plan.addAllowedType(workitem.type.id)
plan.removeAllowedType(workitem.type.id)
plan.addAllowedType('task')

A list of workitems in this plan can be retreived.

workitems = plan.getWorkitemsInPlan()

Plan class

class polarion.plan.Plan(polarion, project, polarion_record=None, uri=None, id=None, new_plan_name=None, new_plan_id=None, new_plan_parent=None, new_plan_template=None)

A polarion Plan

addAllowedType(type)

Add an allowed workitem type to this plan :param type: a string with the type name :return: None

addToPlan(workitem: Workitem)

Add a workitem to the plan :param workitem: Workitem :return: None

getChildren()

Get the child plans :return: List of Plans, or empty list if there are no children.

getParent()

Get the parent plan :return: parent Plan

getWorkitemsInPlan()

Get all workitems from this plan :return: Array of workitems

removeAllowedType(type)

Remove an allowed workitem type to this plan :param type: a string with the type name :return: None

removeFromPlan(workitem: Workitem)

Remove a workitem from the plan :param workitem: Workitem :return: None

save()

Update the plan in polarion

setDueDate(date)

Set the due date for this plan :param date: date object :return: None

setFinishedOnDate(date)

Set the finished date for this plan :param date: date object :return: None

setStartDate(date)

Set the start date for this plan :param date: date object :return: None

setStartedOnDate(date)

Set the started on date for this plan :param date: date object :return: None