notionparallax / ShadowWolf

A mini ERP type app to capture people, projects and their relationships.
GNU General Public License v2.0
1 stars 6 forks source link

search and sort on indexes #360

Open notionparallax opened 10 years ago

notionparallax commented 10 years ago

These are a few stabs, I'm not happy about sort being |a| or |z| and then or being ||. Maybe or should just be or.

Lets bat this around a bit before we start to implement it.

Feature: Searching on an Index page

  Scenario: Searching for a person
    Given I am on the people index
    When  I type a letter into the search box
    Then  The list should update within 100ms

  Scenario: Searching for a project
    Given I am on the project index
    When  I type a letter into the search box
    Then  The list should update within 100ms

  Scenario: sorting people by first name
    Given I am on the people index
    When  I type "first:|a|" into the search box
    Then  The list should be sorted alphabetically by first name

  Scenario: sorting people by first name
    Given I am on the people index
    When  I type "first:|z|" into the search box
    Then  The list should be reverse sorted alphabetically by first name

  Scenario: sorting people by last name
    Given I am on the people index
    When  I type "last:|a|" into the search box
    Then  The list should be sorted alphabetically by last name

  Scenario: sorting people by last name
    Given I am on the people index
    When  I type "last:|z|" into the search box
    Then  The list should be reverse sorted alphabetically by last name

  Scenario: searching and sorting people by first name
    Given I am on the people index
    When  I type "first:be|a|" into the search box
    Then  The list should be sorted alphabetically by first name
    And   All people shown should have "be" in their first name somewhere

  Scenario: searching for everyone with a postgraduate degree
    Given I am on the people index
    When  I type "qualifications.level:'Postgraduate degree'" into the search box
    Then  The list should show everyone who has a Postgraduate degree listed

  Scenario: searching for everyone who is active and has no extension
    Given I am on the people index
    When  I type "condition:Active & extension:''" into the search box
    Then  The list should show everyone who is active and has no extension

  Scenario: searching for everyone who is active or has no extension
    Given I am on the people index
    When  I type "condition:Active || extension:''" into the search box
    Then  The list should show everyone who is active and has no extension
ghost commented 9 years ago

This would be helpful when searching for projects

ie could search the title, categories, project description, etc and categorise the search results accordingly

img_5402