[WEBCLIENT-211] Query cancel causes prior query to be deleted Created: 27/Apr/17  Updated: 16/Jun/17  Resolved: 13/Jun/17

Status: Resolved
Project: i2b2 Web Client
Component/s: Web Client
Affects Version/s: 1.7.09
Fix Version/s: 1.7.09

Type: Bug Priority: Major
Reporter: Lori Phillips Assignee: Janice Donahoe
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Affects View/s:
Previous Queries
i2b2 Feature/s:
Queries
Affects Database/s:
All databases
Testing Notes: STEPS FOR TESTING
1. Run a query to completion.
2. Make note of the <query_master_id>.
3. Verify the query appears correctly in previous queries.
4. Run a second query, only click on the cancel button once the query starts running.
5. Make note of the <query_master_id> for the cancelled query.
6. Go to Previous Queries and verify the first query still appears in the list of queries.
7. Open the XML messages in Previous Queries.
7. Find the 'deleteQueryMasterId' message.
8. Verify the <query_master_id> for the cancelled query is sent in the request message.

+++++++++++++++++++++++++++
Tested latest change and cancel queries is now working correctly.
Participant/s:

 Description   
Run a query to completion. (Circulatory system)

Then run a longer query (20 sec or so) and cancel it quickly. (Digestive system)

The Circulatory system query will be deleted from the PQ.


 Comments   
Comment by Janice Donahoe [ 01/Jun/17 ]
Tested with the latest build and appears to be working correctly.
Comment by Janice Donahoe [ 06/Jun/17 ]
This issue was marked resolved too soon. It is not working correctly. If you run two queries and cancel the second query then the first query is marked as deleted. This only happens if you stay logged in, in other words, do not log out of the Web Client in between queries.

Steps to Reproduce:

1. Run two queries, let the first query finish and verify it appears in previous queries correctly (make note of the QUERY_MASTER_ID).

2. Run a second query and as soon as it starts to run click on cancel.

3. Make note of the QUERY_MASTER_ID that is returned in the response message.

4. If Previous Queries did not refresh automatically then refresh the list.

5. Notice the 1st query you ran is no longer in the list and the one you just ran is appearing.

6. In the QT_QUERY_MASTER table you will notice the 1st query has the DELETE_FLAG set to 'Y' and has a DELETE_DATE that is after the END_DATE in the QT_QUERY_INSTANCE table.

The DELETE_FLAG and DELETE_DATE should be for the second query not the first query.

Not sure if it matters but the second query was run & cancelled within a minute of the first query finishing.
Generated at Sat Jun 06 07:19:43 UTC 2020 using JIRA 7.6.3#76005-sha1:8a4e38d34af948780dbf52044e7aafb13a7cae58.