Bug 5698 - Provide datepicker for sql reports runtime parameters
Summary: Provide datepicker for sql reports runtime parameters
Alias: None
Product: Koha
Classification: Unclassified
Component: Reports (show other bugs)
Version: 3.8
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Ian Walls
QA Contact: Jonathan Druart
: 7640 (view as bug list)
Depends on:
Reported: 2011-02-04 20:38 UTC by Owen Leonard
Modified: 2012-10-25 23:09 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:

Bug 5698: Add date picker option to SQL Runtime Parameters (3.42 KB, patch)
2012-03-10 14:08 UTC, Ian Walls
Details | Diff | Splinter Review
Bug 5698: Add date picker option to SQL Runtime Parameters (3.53 KB, patch)
2012-03-10 15:03 UTC, Jared Camins-Esakov
Details | Diff | Splinter Review
Followup proposed for discussion (3.11 KB, patch)
2012-03-16 10:57 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2011-02-04 20:38:19 UTC
It would be helpful if a datepicker widget could be tied to particular reports runtime parameters. It would be logical to integrate it with the current syntax for using authorized values. The authorized values syntax looks like this:

<<Question to ask|authorised_value>>

For date fields, you could do:

<<Last seen|date>>

...and have the script check for the "date" parameter.
Comment 1 Owen Leonard 2012-03-02 13:22:35 UTC
*** Bug 7640 has been marked as a duplicate of this bug. ***
Comment 2 Ian Walls 2012-03-10 14:08:59 UTC Comment hidden (obsolete)
Comment 3 Jared Camins-Esakov 2012-03-10 15:03:30 UTC
Created attachment 8138 [details] [review]
Bug 5698: Add date picker option to SQL Runtime Parameters

Adds a date picker for SQL reports with the 'date' authorised_value.  Updates help
documentation for this new feature, as well.

To test:
1.  Create a new report with two date parameters, using the syntax:
<<Label for this selection of date|date>>
2.  Run the report
3.  Select dates
4.  The SQL generated should format the dates properly in ISO, and keep track of which
date is which

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Comment 4 Jonathan Druart 2012-03-16 10:57:07 UTC
Created attachment 8220 [details] [review]
Followup proposed for discussion

QA Comment,

Hi Ian, 
Your patch works as expected.
But I am  annoyed the html code is generated in the perl script (ok, it is the code style of this page...).
What do you think about this patch ?

It is not clean, but perhaps a bit better ? :-/

I can understand if you do not agree with it and in this case I will pass QA your patch. It is just a proposition ;)
Comment 5 Ian Walls 2012-03-16 14:25:08 UTC
I agree that generating the code in the Perl is less than optimal.  That's how it works for all the other SQL params, so rather than rearchitect the whole section, I just carried through on the existing paradigm.

But, that said, your solution is much more elegant, and does the same job.  Marking as Signed off and Passed QA.
Comment 6 Paul Poulain 2012-03-19 15:22:09 UTC
patch and follow-up pushed
Comment 7 Nicole C. Engard 2012-03-19 15:44:13 UTC
I just did a pull on master, but don't see this feature.

Comment 8 Paul Poulain 2012-03-19 16:01:38 UTC
(In reply to comment #7)
> I just did a pull on master, but don't see this feature.
Nicole, when I test/push, I do that locally, then push on public repo, after some push.

I changed the status less than 2 hours ago, it's still not on public repo, pushed just on my local git ;-)
Comment 9 Nicole C. Engard 2012-03-19 16:34:05 UTC
Okey Dokey!
Comment 10 Nicole C. Engard 2012-03-19 17:53:44 UTC
Love it! Works Awesome!!