Bug 35509

Summary: Make SQL autocomplete an optional feature
Product: Koha Reporter: Lucas Gass (lukeg) <lucas>
Component: ReportsAssignee: Lucas Gass (lukeg) <lucas>
Status: Failed QA --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: blawlor, bugzilla, dcook, kebliss
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 32613    
Bug Blocks:    
Attachments: Bug 35509: Add a way to disable SQL autocompletion

Description Lucas Gass (lukeg) 2023-12-06 16:55:53 UTC
Bug 32613 added autocomplete to the SQL CodeMirror editor. Not everyone loves this. It would be nice if there was a a way to turn it off per user.
Comment 1 Lucas Gass (lukeg) 2023-12-19 23:34:14 UTC
Created attachment 160088 [details] [review]
Bug 35509: Add a way to disable SQL autocompletion

To test:
1. APPLY PATCH
2. Create or edit a report
3. Notice the "Use SQL autocomplete:" checkbox when creating or editing a report
4. Try checking/unchecking the box and make sure that autocompletion turns off when it is unchecked and is on when it is checked.
Comment 2 Brendan Lawlor 2023-12-20 19:23:15 UTC
The Use SQL autocomplete check box worked to turn SQL autocomplete on and off for a saved SQL report, but when you toggle the checkbox the SQL in the report reverts to the last saved version of the SQL. 

That is not consistent with the other inputs in the SQL report form, which you can  edit without reverting any new changes you have made in the SQL field. It would be frustrating if you were working on writing a report and click to change the autocomplete setting because you would lose your work.
Comment 3 Lucas Gass (lukeg) 2023-12-21 14:44:38 UTC
(In reply to Brendan Lawlor from comment #2)
> The Use SQL autocomplete check box worked to turn SQL autocomplete on and
> off for a saved SQL report, but when you toggle the checkbox the SQL in the
> report reverts to the last saved version of the SQL. 
> 
> That is not consistent with the other inputs in the SQL report form, which
> you can  edit without reverting any new changes you have made in the SQL
> field. It would be frustrating if you were working on writing a report and
> click to change the autocomplete setting because you would lose your work.

FQA based on Brendan's comments.