zetkin / organize.zetk.in

Organizer front-end of the Zetkin system for organizing activism
21 stars 14 forks source link

Bug rendering custom field in query #1250

Closed richardolsson closed 3 years ago

richardolsson commented 3 years ago

Steps to reproduce:

  1. Create a Smart Search query or all assignment
  2. Open/edit the query
  3. Add a filter for "Custom Field"
  4. Select a custom field (I experienced this with a date field, but should be same for any type)
  5. Configure the filter
  6. Save and close the Smart Search
  7. Refresh the page (to clear state)
  8. Open the edit pane for the query again

Expected results: Should look exactly like after step 5 Actual results: The "Choose field" select box is the only one showing, probably because the list of fields had not loaded when the filter list was rendered

niklasva82 commented 3 years ago

Cannot reproduce. The configuration of the smart search looks the same in step 8 as after step 5 for me.

richardolsson commented 3 years ago

Did you try with a date field? At least with a date field, this is what it looks like to me after step 8, even though the configuration is clearly there (because the query works):

image

As theorized in the description above, this is probably because the list of fields had not loaded when I opened the query the second time (after refreshing the page in step 7 to clear state). If I close the pane and open it again, the state will have loaded, and the widget looks right.

niklasva82 commented 3 years ago

I can reproduce this when refreshing with the edit pane open now. Should be a simple fix.