[Bug 34166] New: Show total price in table of suggestions
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34166 Bug ID: 34166 Summary: Show total price in table of suggestions Change sponsored?: --- Product: Koha Version: 22.11 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Acquisitions Assignee: koha-bugs@lists.koha-community.org Reporter: katrin.fischer@bsz-bw.de QA Contact: testopia@bugs.koha-community.org For determining if a suggestion is accepted the price can play a big role. Sometimes libraries will have a separate custom status for items that need to wait for available funds. It would be great if Koha showed the total price of the suggestion in the table. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34166 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |michaela.sieber@kit.edu Version|22.11 |master -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34166 Michaela Sieber <michaela.sieber@kit.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=41441 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34166 --- Comment #1 from Michaela Sieber <michaela.sieber@kit.edu> --- *** Bug 41441 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34166 Michaela Sieber <michaela.sieber@kit.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |baptiste.wojtkowski@biblibr | |e.com, | |clemens.tubach@kit.edu, | |jonathan.druart@gmail.com Status|NEW |CONFIRMED Keywords| |Academy Patch complexity|--- |Trivial patch --- Comment #2 from Michaela Sieber <michaela.sieber@kit.edu> --- To reproduce: 1.) Go to Suggestions (cgi-bin/koha/suggestion/suggestion.pl) 2.) Enter a new purchase suggestion with a Title and some acquisition data like price & currency, fund and copies 3.) verify that there is already a column for fund, but there are no columns for the total price The total price is stored in the database in suggestions.total suggested total cost = price*quantity updated for currency -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34166 --- Comment #3 from Olivia Reynolds <olivia.reynolds@openfifth.co.uk> --- Created attachment 200027 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200027&action=edit Bug 34166: Add total column to suggestions table This patch displays the "total_price" field from the API in the acquisition suggestions table. In line with other totals, it is displayed unitless after currency conversion. Test plan: 1. Navigate to Acquisitions > Suggestions. 2. Click "New purchase suggestion", then add a title, price, and number of copies. 3. Make note of the calculated total price. 3. Save the suggestion to return to the table. 4. Verify there is no "total" column on the suggestions table. 5. Apply patch and refresh. 6. Verify there is a "total" column on the suggestions table that matches the previously displayed total price. Sponsored-by: Open Fifth -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34166 Olivia Reynolds <olivia.reynolds@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |olivia.reynolds@openfifth.c |ity.org |o.uk CC| |olivia.reynolds@openfifth.c | |o.uk -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34166 Olivia Reynolds <olivia.reynolds@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|CONFIRMED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34166 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #4 from Jonathan Druart <jonathan.druart@gmail.com> --- The column visbility of this table can be configured: 1260 var suggestions_table_settings = [% TablesSettings.GetTableSettings( 'acqui', 'suggestions', 'suggestions', 'json' ) | $raw %] You need to add the new column to admin/columns_settings.yml -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34166 --- Comment #5 from Jonathan Druart <jonathan.druart@gmail.com> --- Also please clarify the use of "??", why do you fallback on empty string instead of "0"? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34166 --- Comment #6 from Olivia Reynolds <olivia.reynolds@openfifth.co.uk> --- Thanks for the review, and apologies for missing the columns settings. I'll include that in a revised patch. I chose the empty string over "0" as I think it's a clearer sentinel value for there being no data, which can't be confused with a suggestion that costs nothing. I can't immediately find another similar case within Koha, but if there's an accepted style I'm happy to adopt that instead. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34166 Olivia Reynolds <olivia.reynolds@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff Sponsorship status|--- |Sponsored Comma delimited| |Open Fifth list of Sponsors| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34166 Olivia Reynolds <olivia.reynolds@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #200027|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34166 --- Comment #7 from Olivia Reynolds <olivia.reynolds@openfifth.co.uk> --- Created attachment 200082 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200082&action=edit Bug 34166: Add total column to suggestions table This patch displays the "total_price" field from the API in the acquisition suggestions table. In line with other totals, it is displayed unitless after currency conversion. Test plan: 1. Navigate to Acquisitions > Suggestions. 2. Click "New purchase suggestion", then add a title, price, and number of copies. 3. Make note of the calculated total price. 3. Save the suggestion to return to the table. 4. Verify there is no "Total" column on the suggestions table. 5. Apply patch, update database, and refresh. 6. Verify there is a "Total" column on the suggestions table that matches the previously displayed total price. 7. Verify the "Total" column is listed under the "Columns" dropdown. 8. Above the suggestions table, click "Configure". 9. In the column settings for suggestions, check both "Is hidden by default" and "Cannot be toggled" for "total". 10. Underneath the column settings for suggestions, uncheck "Save configuration state on page change". 11. Save the column settings. 12. Return to the suggestions table. 13. Verify the "Total" column is hidden. 14. Verify the "Total" column is not listed under the "Columns" dropdown. Sponsored-by: Open Fifth -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34166 --- Comment #8 from Jonathan Druart <jonathan.druart@gmail.com> --- We usually don't add new columns into the DB. Did you add it because you found a bug if it was not there? I am pretty sure there is a bug if we don't add new columns, but people never complained... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34166 --- Comment #9 from Olivia Reynolds <olivia.reynolds@openfifth.co.uk> --- I added it mostly to be explicit, but looking through the commit log it seems the standard is to omit that, so I'll drop that atomicupdate for consistency. I don't think omitting it will cause any issues - TablesSettings uses an update_or_create when saving and assigns default values on load. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34166 Olivia Reynolds <olivia.reynolds@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #200082|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34166 --- Comment #10 from Olivia Reynolds <olivia.reynolds@openfifth.co.uk> --- Created attachment 200090 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200090&action=edit Bug 34166: Add total column to suggestions table This patch displays the "total_price" field from the API in the acquisition suggestions table. In line with other totals, it is displayed unitless after currency conversion. Test plan: 1. Navigate to Acquisitions > Suggestions. 2. Click "New purchase suggestion", then add a title, price, and number of copies. 3. Make note of the calculated total price. 3. Save the suggestion to return to the table. 4. Verify there is no "Total" column on the suggestions table. 5. Apply patch, update database, and refresh. 6. Verify there is a "Total" column on the suggestions table that matches the previously displayed total price. 7. Verify the "Total" column is listed under the "Columns" dropdown. 8. Above the suggestions table, click "Configure". 9. In the column settings for suggestions, check both "Is hidden by default" and "Cannot be toggled" for "total". 10. Underneath the column settings for suggestions, uncheck "Save configuration state on page change". 11. Save the column settings. 12. Return to the suggestions table. 13. Verify the "Total" column is hidden. 14. Verify the "Total" column is not listed under the "Columns" dropdown. Sponsored-by: Open Fifth -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34166 John Vinke <jvinke@austinseminary.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34166 John Vinke <jvinke@austinseminary.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jvinke@austinseminary.edu --- Comment #11 from John Vinke <jvinke@austinseminary.edu> --- Signed-off-by: John Vinke <jvinke@austinseminary.edu> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34166 Biblibre Sandboxes <sandboxes@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #200090|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34166 --- Comment #12 from Biblibre Sandboxes <sandboxes@biblibre.com> --- Created attachment 201910 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201910&action=edit Bug 34166: Add total column to suggestions table This patch displays the "total_price" field from the API in the acquisition suggestions table. In line with other totals, it is displayed unitless after currency conversion. Test plan: 1. Navigate to Acquisitions > Suggestions. 2. Click "New purchase suggestion", then add a title, price, and number of copies. 3. Make note of the calculated total price. 3. Save the suggestion to return to the table. 4. Verify there is no "Total" column on the suggestions table. 5. Apply patch, update database, and refresh. 6. Verify there is a "Total" column on the suggestions table that matches the previously displayed total price. 7. Verify the "Total" column is listed under the "Columns" dropdown. 8. Above the suggestions table, click "Configure". 9. In the column settings for suggestions, check both "Is hidden by default" and "Cannot be toggled" for "total". 10. Underneath the column settings for suggestions, uncheck "Save configuration state on page change". 11. Save the column settings. 12. Return to the suggestions table. 13. Verify the "Total" column is hidden. 14. Verify the "Total" column is not listed under the "Columns" dropdown. Sponsored-by: Open Fifth Signed-off-by: Michaela <michaela.sieber@kit.edu> -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org