cccs-Dustin opened a new issue #18949: URL: https://github.com/apache/superset/issues/18949
Within the SQL Editor section of SQL Lab, when you select the “+” icon beside the current tab to create a new query, the name of the query gets increased incrementally (see the image below) [except there is consistently a duplicate name for the first two].  However, if you select the “+“ icon on the top right of the web page beside the settings drop down and select “SQL query“, the names of the new queries do not increase incrementally. They are all just named "Untitled Query 2" (see the images below).   In the image above, the query tab in the far right was created using the "SQL query" button under the “+“ icon drop down on the top right of the page. As you can see, the query name was not increased incrementally. #### How to reproduce the bug 1. Go to the SQL Editor page by selecting it from the main menu under the "SQL Lab" drop down. 2. You can immediately notice one of the bugs that occurs, the first untitled query will always be called "Untitled Query 2", never "Untitled Query 1". 3. Click on the "+" button next to the list of query tabs, it should properly increment the query tab names. 4. Select the “+“ icon on the top right of the web page beside the settings drop down, and then click "SQL query" 5. You will notice that the name of the newly created query is "Untitled Query 2". No matter how many times you complete step 4, it will never increment the new query tab names. ### Expected results When either the "+" button next to the query tabs or the "SQL query" button from the drop down is selected, they should both increment the name of the untitled query properly. ### Actual results When the "SQL query" button from the drop down is selected, the newly created query tabs are always named "Untitled Query 2". Also, the way the code is currently implemented, there will never be an "Untitled Query 1". #### Screenshots Please see the main summary for screenshots ### Environment - operating system name and version: Ubuntu 20.04 - browser type and version: Google Chrome (Version 97.0.4692.71) - superset version: Superset 1.4 - python version: Python 3.8.12 - node.js version: Node v14.16.1 - any feature flags active: N/A ### Checklist Make sure to follow these steps before submitting your issue - thank you! - [x] I have checked the superset logs for python stacktraces and included it here as text if there are any. - [x] I have reproduced the issue with at least the latest released version of superset. - [x] I have checked the issue tracker for the same issue and I haven't found one similar. ### Additional context Also, since discovering this bug, I have created a fix for it on my local fork. I will create a corresponding PR that fixes this bug (and link it to this issue). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
