Hello Simon,
Just following up to see if you have solve this issue. As
@Sagi Gabay mentioned it seems odd given that the User can see the User Story in the UI, and that you are using an API Key by that same User.
Did you try parsing the Workspace/Project parameters in the GET request too? This would be needed if the User Story is not in the Default Project for that User. Note: this is in addition to the Project Scope Down/Up.
I'd be happy to do some testing with Postman or something, or provide an example Postman payload if you would like, or arrange a working session offline. I'm hoping you solved it but feel free to ping us if you would like to review it further.
-Chris
Original Message:
Sent: 01-20-2021 05:38 PM
From: Simon Varley
Subject: Rally API can't see a User Story
Thanks very much for the suuggestion Sagi,
I tried setting up only, down only and then both (shown below), but always theTotalResultCount = 0
public RallyUserStory getUserStory(String userStoryId) {
QueryRequest request = new QueryRequest("HierarchicalRequirement");
request.setQueryFilter(new QueryFilter("FormattedID", "=", userStoryId));
request.setScopedDown( true );
request.setScopedUp( true );
QueryResponse response = query( request );
RallyUserStory userStory = new RallyUserStory( response );
return userStory;
}
Original Message:
Sent: 01-20-2021 04:19 PM
From: Sagi Gabay
Subject: Rally API can't see a User Story
Hi Simon,
It's difficult to know based only on what you had mentioned. You may want to look into the Project you're looking into.
When using WSAPI then it will look for the object in the user's default workspace and default project, unless you specify the workspace and project you'd like to look into using the 'Workspace' and 'Project' argument on the GET call. You can also use the ProjectScopeDown and ProjectScopeUp flags to make certain you're scoping your query correctly.
I am guessing that perhaps you aren't using these arguments in your call and then the API is looking at that user's default project which perhaps isn't where this user story is.
I hope this helps.
Let us know.
Sagi
Original Message:
Sent: 01-20-2021 04:06 PM
From: Simon Varley
Subject: Rally API can't see a User Story
Hi All,
A user can see a US in the Rally UI, as they have access to the team/project.
When I'm using the Rally API with an api key owned by that user - I get no results.
For US that we both have access to, the Rally API finds the US no problem.
I changed the Rally API to set the project ref to the top level parent project, no difference.
Any ideas about a configuration that I have to make?
Thanks
-Simon