Commit Graph

56 Commits (117a97f12cfb3ccf84499bb8af40d3f6ee38265b)

Author SHA1 Message Date
ikame f982da7ebb US #50: Neighbors nav for taskboard and kanban 2014-02-27 13:38:51 +01:00
ikame 9bc84067d7 Fix neighbors fetching in user stories
* Order the received queryset if it doesn't have ordering.
* Do not order UserStory model by "ref" because the query:
  `queryset.filter(Q(project__gt=1) | Q(order__gt=2) | Q(ref__gt=26))`
  give the wrong result. We need to use the query:
  `queryset.filter(Q(project__gt=1) | Q(order__gt=2))`
  because in SQL there's no short-circuiting.
2014-02-26 22:11:05 +01:00
ikame e9dfbe7378 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.
2014-02-26 12:47:55 +01:00
David Barragán Merino 8177eeef26 Now a user story can be assigned 2014-02-25 13:57:44 +01:00
David Barragán Merino ff1612e282 US #57: Task #90: Create a blocked abstract model 2014-02-22 06:12:25 +01:00
Jesús Espino 99b9066965 US#49: Renaming app to Taiga 2014-01-27 17:33:43 +01:00