kaleidos/taiga-back — pull request #28 by ikame (2014-02-26 11:53:28+00:00)
Title: US #50: Return neighbors when fetching an US/Issue

The response for an UserStory/Issue now contains:

{
...
"neighbors": {
"previous": {
"id": ...,
"ref": ...,
"subject": ...
},
"next": {
... same as above
}
}
}

If there's a neighbor missing the response will contain the empty dict {}:

{
...
"neighbors": {
"previous": {},
...
}
}

Neighbors are looked up applying the same filters defined in the
corresponding ViewSets and the same ordering defined in those filters or
ultimately, in the model's meta. In other words, using the same params
you use to filter the object list, can be used to filter the neighbors
when fetching the object's details.