AutarkLabs / open-enterprise

A suite of apps that includes allocation, dot voting, issue curation, and other planning tools so organizations can collectively budget and design custom reward & bounty systems.
GNU General Public License v3.0
92 stars 54 forks source link

Projects: improve querying behavior #1923

Closed chadoh closed 4 years ago

chadoh commented 4 years ago

Everything has been implemented according to the idea. Effect: pagination works. Downloading issues from GH is fast enough (not blindingly, but it is better than it used to be, especially with pagination). However... there are challenges discovered along the way:

  1. Labels can be used for filtering issues easily:

filterBy: { labels: ["bug", "app: projects"]}

Filtering by milestones doesn't work that way. When we discuss all of it, we may need to decide to take out milestones completely.

  1. Text search is not compatible with filtering by labels. Filtering in normal query realized with filterBy (as above) does not provide any mean for filtering issues by title. What was intended: using search query like this:
    search(
      query:"is:issue state:open ${text to search for} in:title label:bug label:enhancement",
    ) {

    the problem is, when there is more than one label, it searches for issues with all the labels - that's different to what we do now, which is searching for issues with any of the labels. In other words, label:bug label:enhancement will select issues with both of those labels, and in projects app selecting "bug" and "enhancement" from Labels dropdown will select issues with any of them. This required using different queries for filtering by labels and text search. More complication in the code. And then another problem was discovered: text filtering uses whole words. It looks like this:

Aragon-_1_

There is also quite a lot of flickering. Some of the causes were addressed in the old FilterBar related tickets, which got discussed but never merged.

Goals: