| Summary: | Add missing cn_source parameter to reports parameter menu | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Owen Leonard <oleonard> | 
| Component: | Reports | Assignee: | Owen Leonard <oleonard> | 
| Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> | 
| Severity: | normal | ||
| Priority: | P5 - low | CC: | andrew, flyingendpaper, jrobb, koha-bugs, kyle, testopia | 
| Version: | Main | Keywords: | Manual | 
| Hardware: | All | ||
| OS: | All | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Crowdfunding goal: | 0 | 
| Patch complexity: | Trivial patch | Documentation contact: | |
| Documentation submission: | Text to go in the release notes: | 
       This patch adds a link for the previously-hidden option of using a runtime parameter for selecting "Source of classification or shelving scheme." Now when composing an SQL report you can click the "Insert runtime parameter" button to see a menu that includes this option. 
 | 
        |
| Version(s) released in: | 
       21.11.00 
 | 
        
        Circulation function: | |
| Bug Depends on: | 17600, 27644, 29352 | ||
| Bug Blocks: | |||
| Attachments: | 
              Bug 29351: Add missing cn_source parameter to reports parameter menu
               Bug 29351: Add missing cn_source parameter to reports parameter menu Bug 29351: Add missing cn_source parameter to reports parameter menu  | 
      ||
I didn't know this was an option! Good catch! Created attachment 127063 [details] [review] Bug 29351: Add missing cn_source parameter to reports parameter menu This patch adds an option to insert "Source of classification or shelving scheme" as a runtime parameter in SQL reports. The ability to use cn_source as a parameter seems to have always been part of this feature but wasn't documented. To test, apply the patch and go to Reports -> Create from SQL. - Click the "Insert runtime parameter" button and select "Classification source." - Customize the parameter label if you wish and click "Insert parameter." - The parameter should be inserted like this: <<Source of classification or shelving scheme|cn_source>> - Use it to create a valid SQL report, for example: SELECT * FROM items WHERE cn_source = <<Source of classification or shelving scheme|cn_source>> LIMIT 10 - Confirm that upon running the report you are prompted to select a classification source. - Confirm that the report runs correctly. I'm getting this error when trying to run my report: Undefined subroutine &CGI::Compile::ROOT::kohadevbox_koha_reports_guided_reports_2epl::GetClassSources called at /kohadevbox/koha/reports/guided_reports.pl line 761 Sorry, I should have put this in the test plan: There is a followup on Bug 17600 which is required for GetClassSources to work: See comment 148 on that bug. Created attachment 127069 [details] [review] Bug 29351: Add missing cn_source parameter to reports parameter menu Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Thanks! I Was able to test successfully after I applied your patch from 17600. Created attachment 127116 [details] [review] Bug 29351: Add missing cn_source parameter to reports parameter menu This patch adds an option to insert "Source of classification or shelving scheme" as a runtime parameter in SQL reports. The ability to use cn_source as a parameter seems to have always been part of this feature but wasn't documented. To test, apply the patch and go to Reports -> Create from SQL. - Click the "Insert runtime parameter" button and select "Classification source." - Customize the parameter label if you wish and click "Insert parameter." - The parameter should be inserted like this: <<Source of classification or shelving scheme|cn_source>> - Use it to create a valid SQL report, for example: SELECT * FROM items WHERE cn_source = <<Source of classification or shelving scheme|cn_source>> LIMIT 10 - Confirm that upon running the report you are prompted to select a classification source. - Confirm that the report runs correctly. Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Pushed to master for 21.11, thanks to everybody involved!  | 
There has always been a cn_source ("Source of classification or shelving scheme") runtime parameter available to SQL reports, although it isn't mentioned in the wiki.