-
Notifications
You must be signed in to change notification settings - Fork 41
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
[IO-1800][internal] Set Priority of items #699
Conversation
IO-1800 Core: Edit items: Set priority
|
payload = { | ||
"priority": priority, | ||
"filters": { | ||
"item_ids": [str(item_id)], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the set priority endpoint can accept a list of item_ids
, would it made sense to allow this to as well?
If so, maybe:
set_item_priority()
acceptsitem_ids: List[UUID]
, then:"item_ids": [str(item_id) for item_id in item_ids]
at this point
expected_endpoint = "/v2/teams/test-team/items/priority" | ||
|
||
# Define the expected response | ||
expected_response = {"status": "success"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might be missing something, but if successful doesn't the endpoint always return {"affected_item_count": n}
?
I couldn't get it to return {"status": "success"}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you pass it a 422 inducing load of rubbish, it returns a response including errors
Graphotate.Common.APIError
example:
{
"errors": {
"code": "EXTERNAL_STORAGE_LIMIT_REACHED",
"detail": {},
"message": "Error message",
"status": 422
}
}```
Problem
The initial set priority had opportunity for some improvements
Solution
Made the improvements