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

Already on GitHub? Sign in to your account

Story search #68

Closed
kaleworsley opened this Issue Nov 22, 2011 · 5 comments

Comments

Projects
None yet
6 participants
Owner

kaleworsley commented Nov 22, 2011

I'm adding story search to projects, like Pivotal Tracker.

GET "http://0.0.0.0:3000/projects/1/stories/search/something to search"

{
  "total_hits_with_done": 1,
  "total_points_completed": 5,
  "total_points": 6,
  "total_hits": 5,
  "stories": [
    {
      "id": 1
    },
    {
      "id": 2
    },
    {
      "id": 3
    },
    {
      "id": 4
    },
    {
      "id": 5
    }
  ]
}

The JSON is the same format as PT. (I assume 'total_hits_with_done' and 'total_points_completed' means stories with state set to finished.)

Sound good?

Contributor

malclocke commented Nov 22, 2011

That would be awesome. I wouldn't worry too much about implementing the same JSON format as PT in this case, I only see that as important when we start to implement the API.

Just returning a JSON array of matches should be enough I'd say. In fact, does the search even need to make a call server side? We have all the data in the JS stories collection. Obviously it's not going to be as efficient as an SQL query over a large story set, but I expect most projects will be no bigger than a few hundred stories, iterating over them with a regex search of title and description shouldn't take to long. Maybe do some jsperf tests on it.

How were you intending on doing it server side?

Also, I don't know whether we need to implement the search results display in the same way PT does, e.g. in a custom column. There may be better alternatives, what do you think?

We need this also. Only need to go server side to include done stories when you stop loading all done stories. I wrote a quick and dirty importer for pivotal (on the aelogica fork) and tested against one of my larger projects. I can see from a multi-year project I might not want to load the entire backlog. Server side search will be an eventual necessity. In most cases though, search is only necessary across the current/backlog/chilly-bin which should be entirely in the collection on the browser. Custom column is handy. What would be some other ideas? Hide non-matching stories, leaving them in place?

I think this would be a kick-arse feature.
As @malclocke suggests, using a regular expression on the client-side would be enough for searching matching data in the current loaded stories. Then, to take advantage on @stalcottsmith's suggestion, we could add an "Advanced Search" feature where the user can select from a list of options to tell if the search should be performed on the server side, like to include delivered stories that don't appear on the backlog and so on.
Sounds good?

+1 to mongrelions suggestion :) (meaning +1 to both @malclocke and @stalcottsmith as well :P)

grjones commented Dec 6, 2012

This request looks really old. Anyone know if this still in the pipeline at all?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment