-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add SpecifyUser to Query Combo Box in Export Feed #4345
Conversation
Triggered by 75130c6 on branch refs/heads/issue-4334
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now that you identified the solution, I can see what might have caused it:
specify7/specifyweb/frontend/js_src/lib/components/QueryComboBox/useTypeSearch.tsx
Lines 37 to 38 in e2d9b08
typeSearches.find(({ name }) => name === initialTypeSearch) ?? | |
typeSearches.find(({ table }) => table === relatedTable) ?? |
that code says that if type search wasn't explicitly passed, it would try to find a type search for the specify user table
probably I had a type search for specify user defined in my database when I was testing this, but your database doesn't?
if that is the case, your solution is good - this kind of stuff shouldn't be database dependent
and even better, if typesearch doesn't exist, we might be able to define one on the fly dynamically for any table (out of scope of this PR though)
Triggered by 181eeb3 on branch refs/heads/issue-4334
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a
typeSearch
to allow searching. Users will have to configure a formatter for SpecifyUser to see anything other than<Formatter not defined>
Testing instructions
0. Make sure you have a formatter defined for SpecifyUser table. Add one if not.
Run as user
orSend completion notification to user
field (which is query combo box)It is rare that databases will have a formatter for specifyUser (but that's easy to add with xml-editor, so I think it is fine). Until #4312 is merged, SpecifyUser won't be visible in table list for visual editor. So, the following can be added to record object formatters to add a basic formatter for SpecifyUser