Skip to content
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

"Save" button shouldn't appear before one selects the source for a native question #18148

Closed
nemanjaglumac opened this issue Sep 30, 2021 · 1 comment · Fixed by #18252
Closed
Assignees
Labels
.Frontend Priority:P3 Cosmetic bugs, minor bugs with a clear workaround Querying/Native The SQL/native query editor .Reproduced Issues reproduced in test (usually Cypress) Type:Bug Product defects
Milestone

Comments

@nemanjaglumac
Copy link
Member

Describe the bug
Metabase currently displays the option to save a native question even before the source (db) for it is selected.

Logs

[backend]  "Input to adhoc-native-query-path does not match schema: \n\n\t   [(named (not (matches-some-precondition? nil)) database-or-id)]  \n\n",
[backend]  :value [nil],
[backend]  :error [(named (not (matches-some-precondition? nil)) database-or-id)]}

To Reproduce
Steps to reproduce the behavior:

  1. Have more than one database (add another H2, for example)
  2. New question > Native query
  3. Without selecting a source database, note that the "Save" option is offered
  4. Click on the "Save" - modal appears
  5. Enter the name for your question and click "Save" button within the modal
  6. Non-human-readable error appears inline

Expected behavior
The original "Save" button shouldn't even appear before it's actually possible to save the question

Screenshots
image

Information about your Metabase Installation:

You can get this information by going to Admin -> Troubleshooting.
local dev, master, 538a5e6, H2, Sample dataset

Severity
Although annoying, it's a cosmetic one and the backend handles this. P3.

@flamber flamber added .Frontend Priority:P3 Cosmetic bugs, minor bugs with a clear workaround Querying/Native The SQL/native query editor and removed .Needs Triage labels Sep 30, 2021
@flamber
Copy link
Contributor

flamber commented Sep 30, 2021

Friends with #15946 (comment).

nemanjaglumac added a commit that referenced this issue Oct 5, 2021
nemanjaglumac added a commit that referenced this issue Oct 6, 2021
@nemanjaglumac nemanjaglumac added the .Reproduced Issues reproduced in test (usually Cypress) label Oct 6, 2021
@flamber flamber added this to the 0.42 milestone Oct 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
.Frontend Priority:P3 Cosmetic bugs, minor bugs with a clear workaround Querying/Native The SQL/native query editor .Reproduced Issues reproduced in test (usually Cypress) Type:Bug Product defects
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants