The reports filters are very 'sticky' - we should provide a link to make clearing the form a 'one-click' thing. To test: - go to the reports module - make sure you got some saved reports - search your saved reports using the author, keyword and date filters - see that there is a button to submit the form, but no link to clear it like on other pages
Created attachment 39474 [details] [review] Bug 14029: Provide 'clear' link to empty reports search filters Patch adds a 'clear' link next to the 'Apply filters' button to empty out the form fields. To test: - go to the reports module - make sure you have some saved reports - search your saved reports using the author, keyword and date filters - verify searching works as expected - verify the new 'clear' link works as expected
Hi Katrin, After clearing the search form I would expect that the form reloads and shows all entries. That's why I propose to the following change to add a submit to the reset function: $("#resetReportsFilter").click(function(e) { e.preventDefault(); $("form[name='ReportsFilter']").find("input[type=text]").val(""); $("form[name='ReportsFilter']").submit(); }); What do you think about? Marc
Created attachment 39708 [details] [review] Bug 14029: Provide 'clear' link to empty reports search filters Patch adds a 'clear' link next to the 'Apply filters' button to empty out the form fields. To test: - go to the reports module - make sure you have some saved reports - search your saved reports using the author, keyword and date filters - verify searching works as expected - verify the new 'clear' link works as expected Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Changed patch to include suggestion from Marc VÂeron for reloading the form on clearing. Thx Marc!
Hi Marc, thx for the suggestion! I included the additional line in the patch with a comment - hope that's ok?
Created attachment 39736 [details] [review] [Signed-off] Bug 14029: Provide 'clear' link to empty reports search filters Patch adds a 'clear' link next to the 'Apply filters' button to empty out the form fields. To test: - go to the reports module - make sure you have some saved reports - search your saved reports using the author, keyword and date filters - verify searching works as expected - verify the new 'clear' link works as expected Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Changed patch to include suggestion from Marc Veron for reloading the form on clearing. Thx Marc! Followed test plan, works as expected. Signed-off-by: Marc Véron <veron@veron.ch>
No JS needed here, the link could point to reports/guided_reports.pl?phase=Use+saved It should do the trick.
Created attachment 39856 [details] [review] [PATCH FOR TESTING] Bug 14029 Try to clear filter and reload page using a link only (comment #6) This patch follows comment #6 for testing a solution without JavaScript. It adds a link as proposed in comment #6. However filter does not change. To verify: Apply this patch only Got to saved reports Apply a filter, e.g. 'Test' for Keyword. Table reloads with filtered reports. Click "Clear" Result: Page reloads, but filter is still active.
Created attachment 39866 [details] [review] [COUNTER-PATCH] Bug 14029: Provide 'clear' link to empty Patch adds a 'clear' link next to the 'Apply filters' button to empty out the form fields. To test: - go to the reports module - make sure you have some saved reports - search your saved reports using the author, keyword and date filters - verify searching works as expected - verify the new 'clear' link works as expected
(In reply to Marc Véron from comment #7) > Created attachment 39856 [details] [review] [review] > [PATCH FOR TESTING] Bug 14029 Try to clear filter and reload page using a > link only (comment #6) Ha yes, the filters are stored in the session! What about my counter-patch?
Created attachment 39868 [details] [review] [COUNTER-PATCH] Bug 14029: Provide 'clear' link to empty reports search filters Patch adds a 'clear' link next to the 'Apply filters' button to empty out the form fields. To test: - go to the reports module - make sure you have some saved reports - search your saved reports using the author, keyword and date filters - verify searching works as expected - verify the new 'clear' link works as expected
Created attachment 39869 [details] [review] [Signed-off] Bug 14029: Provide 'clear' link to empty reports search filters Patch adds a 'clear' link next to the 'Apply filters' button to empty out the form fields. To test: - go to the reports module - make sure you have some saved reports - search your saved reports using the author, keyword and date filters - verify searching works as expected - verify the new 'clear' link works as expected Tested couner patch, followed test plan, works as expected. QA tools ok. Signed-off-by: Marc Véron <veron@veron.ch>
Created attachment 39933 [details] [review] [PASSED QA] Bug 14029: Provide 'clear' link to empty reports search filters Patch adds a 'clear' link next to the 'Apply filters' button to empty out the form fields. To test: - go to the reports module - make sure you have some saved reports - search your saved reports using the author, keyword and date filters - verify searching works as expected - verify the new 'clear' link works as expected Tested couner patch, followed test plan, works as expected. QA tools ok. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Patch pushed to master. Thanks Jonathan!
*** Bug 11172 has been marked as a duplicate of this bug. ***