Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rankAbove and rankBelow #13

Closed
agibson-fl opened this issue Oct 10, 2014 · 4 comments
Closed

rankAbove and rankBelow #13

agibson-fl opened this issue Oct 10, 2014 · 4 comments

Comments

@agibson-fl
Copy link
Contributor

I was wondering about the rankAbove and rankBelow fields. The ruby project is the only rally project that implements these two calls. In fact, it goes a step further and also does rankTo which is not mentioned at all in the rally API docs.

I’m trying to use the C# rally package. In any case, I don’t see anything mentioning rank at all in the C# documentation about rank. No matter what I’ve done so far, I get a message that the rankAbove and rankBelow fields are ignored when the request to the API is made.

I’m building the string to pass to rally like this where above is a string containing the ID of the story I wish to rank above.
story.rankAbove = "/HierarchicalRequirement/" + above;

"Ignored JSON element HierarchicalRequirement.rankAbove during processing of this request."

That tells me that the API doesn’t accept anything for this field. I get the same error when passing a nonsensical name.

"Ignored JSON element HierarchicalRequirement.somethingCrazyAndDoesntExist during processing of this request."

I also tried looking at the DragAndDropRank field, but that looks like it’s not human readable.

Snippet from the rally API docs:
PUT/POST Parameters
The following parameters only have an effect for PUT and POST requests.
rankAbove, rankBelow
Set the value to an object reference url to cause the created/modified object to be ranked in relation to the referenced object.
Example: rankAbove=/slm/webservice/v2.0/defect/
Example: rankBelow=/slm/webservice/v2.0/defect/

Could you clarify? Does this work with the Rally Ruby code?

@krmorse
Copy link
Contributor

krmorse commented Oct 10, 2014

rankAbove and rankBelow are parameters on the actual request rather than the artifact which is why you are getting the error you are getting. I thought the Parameters property was exposed on Request but it is marked internal. You should be able to just add rankAbove=/defect/1 to the parameters. This is a valid issue and I'll follow up soon.

@agibson-fl
Copy link
Contributor Author

I took a brief look at the code you're talking about. One other issue may be that the Request object appears to be used only for Get calls and not Put/Post calls which is what the rank params need. I was looking at the create/update calls and I'm guessing they'd somehow have to be modified to accept the rank params or the Request object?

Or perhaps a new function just for ranking can be added easier? I'm not sure.

The other option I have at this point is manually crafting the request using the API endpoint and calling it manually rather than through the C# dll.

@agibson-fl
Copy link
Contributor Author

I don't believe this is fixed by #18. Like I mentioned before, "the Request object appears to be used only for Get calls and not Put/Post calls which is what the rank params need".

@krmorse krmorse closed this as completed Jul 6, 2016
@krmorse
Copy link
Contributor

krmorse commented Jul 6, 2016

fix implemented in 3.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants