Ranking Example Using Pyral Toolkit

Document ID:  TEC1805134
Last Modified Date:  06/09/2017
{{active ? 'Hide' : 'Show'}} Technical Document Details

Products

  • CA Agile Central

Components

  • API FOR AGILE CENTRAL:ACAPI
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

Instructions:

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.")

 

Please help us improve!

Will this information enable you to resolve your issue?

Please tell us what we can do better.

{{feedbackText.length ? feedbackText.length : '0'}}/255

{{status}}

Not what you were looking for?

Search Again >

Product Information

Support by Product >

Communities

Join a Community >

Chat with CA

Just give us some brief information and we'll connect you to the right CA ExpertCA sales representative.

Our hours of availability are 8AM - 5PM CST.

All Fields Required

connecting

We're matching your request.

Unfortunately, we can't connect you to an agent. If you are not automatically redirected please click here.

  • {{message.agentProfile.name}} will be helping you today.

    View Profile


  • Transfered to {{message.agentProfile.name}}

    {{message.agentProfile.name}} joined the conversation

    {{message.agentProfile.name}} left the conversation

  • Your chat with {{$storage.chatSession.messages[$index - 1].agentProfile.name}} has ended.
    Thank you for your interest in CA.


    Rate Your Chat Experience.

    {{chat.statusMsg}}

agent is typing