[
https://issues.apache.org/jira/browse/AMBARI-14507?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15072950#comment-15072950
]
DIPAYAN BHOWMICK commented on AMBARI-14507:
-------------------------------------------
Problems:
1. When a saved query is selected and then modified in the open queries tab,
when executed if the user moves to saved query tab and selects the same query,
a new open-query tab will be opened with the modified query.
- Fix: When the query is modified and executed the changes to the same saved
query is rolledback and so when the user clicks again, a new tab is opened with
the old value.
- User can save the modified query before and after execution. Before
execution if the user selects the same name, the existing savedquery is
modified. But after execution, internally by design it is considered to be a
new query and hence when saved, this will add a new saved query.
2. When a tab with modified query is closed, a modal popup is raised which asks
if the user wants to save it. If the user cancels it, the changes done were not
getting rolled-back and if the user selected to save it, it was getting set
with empty title and preview.
- Fix: The modification to the query was rolled back. The setting of required
text was added.
3. If the user modifies a query and saves it with the same name, the preview in
the saved-queries tab was not getting changed with the new content.
- Fix: Upon an update of the query file, the field in DB is updated with the
actual value when the entries are read by the frontend after the update.
> Attempt to Open a Saved Query Returns Unexpected Results
> --------------------------------------------------------
>
> Key: AMBARI-14507
> URL: https://issues.apache.org/jira/browse/AMBARI-14507
> Project: Ambari
> Issue Type: Bug
> Components: ambari-views
> Affects Versions: 2.1.2
> Reporter: DIPAYAN BHOWMICK
> Assignee: DIPAYAN BHOWMICK
> Fix For: 2.2.1
>
> Attachments: AMBARI-14507_branch-2.2.patch
>
>
> 1. In Hive View, click Saved Queries
> 2. Click a query to open in Hive Query View
> 3. Modify the query
> 4. Execute the query
> 5. Click Saved Queries
> 6. Click the same query to reopen the original query
> A new tab is created in Hive Query View with the query as modified in step 3
> rather than the original query.
> To retrieve the saved query, one must reload Hive Query View in the browser
> to retrieve it.
> Preferred behavior:
> 1. In Hive View, click Saved Queries
> 2. Click a query to open in Hive Query View
> 3. Modify the query
> 4. Execute the query
> 5. Click Saved Queries
> 7. A dialog box should appear with the message and 3 buttons, Save As,
> Replace, Discard Changes:
> Query has been changed. Save changes?
> Save As ... Replace Discard Changes
> Save As should prompt for a name, replace should overwrite the existing file,
> and discard should close the existing query tab.
> The Saved Queries View should then open.
> 6. Click the same query to reopen the original query
> 7. A new tab with the saved query should be opened
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)