How to have Rally pyral ignore project context
search cancel

How to have Rally pyral ignore project context

book

Article ID: 263337

calendar_today

Updated On:

Products

CA Agile Central SaaS (Rally) CA Agile Central On Premise (Rally) Rally Perpetual Hosted

Issue/Introduction

When making a web services API (WSAPI) call to Rally using pyral, the default behavior is for the toolkit to include a project setting in the call.  Depending on the project hierarchy and the type of API call, the call may fail or may not produce the expected results.

For example, when updating a work item by formatted ID, if the work item doesn't exist in the project that pyral is scoped to, then it will fail with an error as follows:

pyral.restapi.RallyRESTAPIError: Target HierarchicalRequirement US12345 could not be located

 

Resolution

In order to have pyral make a call without using a project, consider making the call as follows with project set to an empty value as shown below:

story = rally.update('UserStory', data , project=None)