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

Creating a view using a query does not pre-fill the query #14916

Closed
williamdes opened this issue Jan 29, 2019 · 12 comments
Closed

Creating a view using a query does not pre-fill the query #14916

williamdes opened this issue Jan 29, 2019 · 12 comments
Assignees
Labels
Bug A problem or regression with an existing feature has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete help wanted ui Issues relating to the user interface
Milestone

Comments

@williamdes
Copy link
Member

Describe the bug

Creating a view using a query does not pre-fill the query

To Reproduce

Steps to reproduce the behavior:

  1. Select from a table
  2. Click on 'Create a view'

Expected behavior

Pre-fill the query into the modal

Actual behavior

Empty query

Additional bug

Submit empty modal shows waiting forever !

@williamdes williamdes added Bug A problem or regression with an existing feature help wanted ui Issues relating to the user interface labels Jan 29, 2019
@bahl24
Copy link
Contributor

bahl24 commented Jan 29, 2019

@williamdes Are you expecting a default query in AS field?

@williamdes
Copy link
Member Author

@bahl24 Yes, the query that I executed or the one automatically executed when browsing the table

@bahl24
Copy link
Contributor

bahl24 commented Jan 30, 2019

Let me try this issue

@bahl24
Copy link
Contributor

bahl24 commented Jan 31, 2019

@williamdes Clicking on table->create view and view->new invoke the same script, so I am planning to use the arguments sent as default value for fields such as 'AS' and 'Column names'.
But I am stuck in how to figure out if table->create view is used or view->new, as table->create view should pre fill the values and view->new should leave them empty.

@williamdes
Copy link
Member Author

@bahl24 phpMyAdmin 4.7.7 had the behavior of using the query, so you can use 4.7.7 to see how it behaved :)

But I am stuck in how to figure out if table->create view is used or view->new, as table->create view should pre fill the values and view->new should leave them empty.

Maybe adding a parameter to fill the query and if no parameter is passed, leave empty ?

bahl24 added a commit to bahl24/phpmyadmin that referenced this issue Jan 31, 2019
Signed-off-by: Nitish Bahl <nitishbahl24@gmail.com>
@bahl24
Copy link
Contributor

bahl24 commented Jan 31, 2019

@williamdes Although I am yet to behavior of 4.7.7, kindly take a look at the above commit. I will fix the additional bug shortly.

Additional bug

Submit empty modal shows waiting forever !

@bahl24
Copy link
Contributor

bahl24 commented Feb 1, 2019

screenshot from 2019-02-01 11-21-00

@williamdes As we already have Go and [X] button for the form, do we require the extra 'Go' and 'Cancel' button in the form footer?

@williamdes
Copy link
Member Author

@bahl24 Only cancel seems okay

bahl24 added a commit to bahl24/phpmyadmin that referenced this issue Feb 1, 2019
Signed-off-by: Nitish Bahl <nitishbahl24@gmail.com>
@williamdes williamdes added the has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete label Feb 1, 2019
@ibennetch
Copy link
Member

The "Edit view" functionality is also affected by this.

Edit view can be found from the Structure tab of a view, below the column list and above the Partition label.

@bahl24
Copy link
Contributor

bahl24 commented Feb 1, 2019

@ibennetch @williamdes
screenshot from 2019-02-01 20-22-24
I get the following screen when I click on edit view.
So, are you referring to autofill the view name, algorithm, definer and sql security fields?

Also, I feel we should remove 'Go' and "close' button from the form footer as another 'Go' and X icon on top of the create view form is already available.
screenshot from 2019-02-01 11-21-00

This also might solve the error you reported #14924 (comment)

@ibennetch
Copy link
Member

Changing the interface would be a separate issue to merge in to master only. The bug fix should go to QA_4_8, but we try not to change the interface in the QA branches.

@bahl24
Copy link
Contributor

bahl24 commented Feb 5, 2019

@ibennetch @williamdes Should I work on removing the buttons then? This will fix #14924 (comment)
screenshot from 2019-02-05 17-42-29

bahl24 referenced this issue in bahl24/phpmyadmin Feb 8, 2019
MauricioFauth added a commit that referenced this issue Mar 21, 2019
[ci skip]

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
@MauricioFauth MauricioFauth self-assigned this Mar 21, 2019
@MauricioFauth MauricioFauth added this to the 4.8.6 milestone Mar 21, 2019
williamdes pushed a commit to bahl24/phpmyadmin that referenced this issue Mar 25, 2019
Fix: phpmyadmin#14926
See: phpmyadmin#14916
Signed-off-by: Nitish Bahl <nitishbahl24@gmail.com>
Signed-off-by: William Desportes <williamdes@wdes.fr>
williamdes added a commit that referenced this issue Mar 25, 2019
Fixes: #14916
Signed-off-by: William Desportes <williamdes@wdes.fr>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A problem or regression with an existing feature has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete help wanted ui Issues relating to the user interface
Projects
None yet
Development

No branches or pull requests

4 participants