Ranking Example Using Pyral Toolkit
search cancel

Ranking Example Using Pyral Toolkit

book

Article ID: 10362

calendar_today

Updated On:

Products

Rally On-Premise Rally SaaS

Issue/Introduction

This is an example of how to rank a User Story in relation to another User Story using the Pyral toolkit. Below are some useful links that were used to create this simple example.

Pyral Toolkit

WS API

This does not include the boiler plate connection and authentication code. You can get an example of that code here. The script, named testRank.py, takes 2 command line parameters. The first parameter is the FormattedID of the HierarchicalRequirement that you want to change the ranking. The second parameter is the FormattedID of the  HierarchicalRequirement used to rank the one from the first parameter below. For the example below, US1 will be ranked below US2.

 

[user@pyralScripts]$ python testRank.py  US1 US2



Environment

Release:
Component: ACAPI

Resolution

query_criteria = 'FormattedID contains "%s"' % args[0]

query_criteria2 = 'FormattedID contains "%s"' % args[1]

response = rally.get('HierarchicalRequirement', fetch=True, query=query_criteria)

response2 = rally.get('HierarchicalRequirement', fetch=True, query=query_criteria2)

story=response.next()

story2=response2.next()

rally.rankBelow( story, story2 )

print("Finished ranking artifacts.")