Bug 34618 - Add sort 1 and 2 fields to basket in acquisitions
Summary: Add sort 1 and 2 fields to basket in acquisitions
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Owen Leonard
QA Contact: Martin Renvoize (ashimema)
URL:
Keywords:
Depends on:
Blocks: 28449 34752
  Show dependency treegraph
 
Reported: 2023-08-25 14:58 UTC by David Roberts
Modified: 2024-01-11 20:45 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This patch adds the option to display Statistic 1 and Statistic 2 columns in basket summary view in acquisitions. The new columns are hidden by default in the updated table configuration.
Version(s) released in:
23.11.00
Circulation function:


Attachments
Bug 34618: Add sort 1 and 2 fields to basket in acquisitions (6.11 KB, patch)
2023-08-29 14:58 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 34618: Add sort 1 and 2 fields to basket in acquisitions (6.17 KB, patch)
2023-08-30 07:47 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 34618: Add sort 1 and 2 fields to basket in acquisitions (6.22 KB, patch)
2023-08-30 08:37 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 34618: Add sort 1 and 2 fields to basket in acquisitions (6.28 KB, patch)
2023-09-08 20:17 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description David Roberts 2023-08-25 14:58:37 UTC
It would be useful to be able to use the table column configurator to be able to add sort 1 and sort 2 to the basket view (table id "orders")
Comment 1 Ray Delahunty 2023-08-29 11:04:30 UTC
We use sort1 for 'Subject fund' and sort2 for 'Purchase reason'. To see the subject fund, we currently have to reopen the basket and scroll to the Modify button. This is a clumsy worflow, and having sort1 and sort2 able to be exposed would be very useful.
Comment 2 Siu Ying Yip 2023-08-29 12:49:41 UTC
Being able to see the sort1 and sort2 fields in basket view without the need to reopen it and modify lines, when no modification is needed would be really helpful.  

It would also be useful for catching errros quicker.  For a period, we hadn't noticed that the sort1 field wasn't being populated from our orders received by EDI.  If there had been a means of seeing that field without opening the basket, our team would have caught the technical glitch a lot sooner.
Comment 3 Owen Leonard 2023-08-29 14:58:05 UTC
Created attachment 154902 [details] [review]
Bug 34618: Add sort 1 and 2 fields to basket in acquisitions

This patch adds the option to display sort1 and sort2 columns in the
view of the contents of a basket in acquisitions. The columns are
labeled "Statistic 1" and "Statistic 2" to match the labels in the
order creation/edit form.

The fields are hidden by default in the updated table configuration.

To test, apply the patch and restart services.

- Go to acquisitions and create a basket if necessary:
  - Search for a vendor and click New -> Basket from the vendor
    toolbar on the vendor search results screen.
  - Create a basket, then click "Add to basket" from the basket details
    page.
  - Add an order to the basket.
- With at least one order in the basket, check the table of orders in
  the basket.
- The columns should be unchanged.
- The table configuration button should show the two statistics fields
  as hidden. Test that they can be displayed.

- Go to Administration -> Table settings.
  - Under Acquisitions -> basket, try changing the settings for the
    Statistic 1 and Statistic 2 fields, and check that your changes are
    reflected in the basket view.

- Test with a vendor which has an EDI account:
  - Enable the EDIFACT system preference.
  - Go to Administration -> EDI accounts and create an account for your
    vendor.
  - Confirm that the table of orders in your basket still displays
    correctly now that the "Supplier report" column is present.
Comment 4 PTFS Europe Sandboxes 2023-08-30 07:47:04 UTC
Created attachment 154935 [details] [review]
Bug 34618: Add sort 1 and 2 fields to basket in acquisitions

This patch adds the option to display sort1 and sort2 columns in the
view of the contents of a basket in acquisitions. The columns are
labeled "Statistic 1" and "Statistic 2" to match the labels in the
order creation/edit form.

The fields are hidden by default in the updated table configuration.

To test, apply the patch and restart services.

- Go to acquisitions and create a basket if necessary:
  - Search for a vendor and click New -> Basket from the vendor
    toolbar on the vendor search results screen.
  - Create a basket, then click "Add to basket" from the basket details
    page.
  - Add an order to the basket.
- With at least one order in the basket, check the table of orders in
  the basket.
- The columns should be unchanged.
- The table configuration button should show the two statistics fields
  as hidden. Test that they can be displayed.

- Go to Administration -> Table settings.
  - Under Acquisitions -> basket, try changing the settings for the
    Statistic 1 and Statistic 2 fields, and check that your changes are
    reflected in the basket view.

- Test with a vendor which has an EDI account:
  - Enable the EDIFACT system preference.
  - Go to Administration -> EDI accounts and create an account for your
    vendor.
  - Confirm that the table of orders in your basket still displays
    correctly now that the "Supplier report" column is present.

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Comment 5 Michaela Sieber 2023-08-30 07:48:44 UTC
Thank you, this is very helpful! Signed off :-)
Comment 6 ByWater Sandboxes 2023-08-30 08:37:16 UTC
Created attachment 154938 [details] [review]
Bug 34618: Add sort 1 and 2 fields to basket in acquisitions

This patch adds the option to display sort1 and sort2 columns in the
view of the contents of a basket in acquisitions. The columns are
labeled "Statistic 1" and "Statistic 2" to match the labels in the
order creation/edit form.

The fields are hidden by default in the updated table configuration.

To test, apply the patch and restart services.

- Go to acquisitions and create a basket if necessary:
  - Search for a vendor and click New -> Basket from the vendor
    toolbar on the vendor search results screen.
  - Create a basket, then click "Add to basket" from the basket details
    page.
  - Add an order to the basket.
- With at least one order in the basket, check the table of orders in
  the basket.
- The columns should be unchanged.
- The table configuration button should show the two statistics fields
  as hidden. Test that they can be displayed.

- Go to Administration -> Table settings.
  - Under Acquisitions -> basket, try changing the settings for the
    Statistic 1 and Statistic 2 fields, and check that your changes are
    reflected in the basket view.

- Test with a vendor which has an EDI account:
  - Enable the EDIFACT system preference.
  - Go to Administration -> EDI accounts and create an account for your
    vendor.
  - Confirm that the table of orders in your basket still displays
    correctly now that the "Supplier report" column is present.

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Ray Delahunty <r.delahunty@arts.ac.uk>
Comment 7 Martin Renvoize (ashimema) 2023-09-08 20:17:54 UTC
Created attachment 155467 [details] [review]
Bug 34618: Add sort 1 and 2 fields to basket in acquisitions

This patch adds the option to display sort1 and sort2 columns in the
view of the contents of a basket in acquisitions. The columns are
labeled "Statistic 1" and "Statistic 2" to match the labels in the
order creation/edit form.

The fields are hidden by default in the updated table configuration.

To test, apply the patch and restart services.

- Go to acquisitions and create a basket if necessary:
  - Search for a vendor and click New -> Basket from the vendor
    toolbar on the vendor search results screen.
  - Create a basket, then click "Add to basket" from the basket details
    page.
  - Add an order to the basket.
- With at least one order in the basket, check the table of orders in
  the basket.
- The columns should be unchanged.
- The table configuration button should show the two statistics fields
  as hidden. Test that they can be displayed.

- Go to Administration -> Table settings.
  - Under Acquisitions -> basket, try changing the settings for the
    Statistic 1 and Statistic 2 fields, and check that your changes are
    reflected in the basket view.

- Test with a vendor which has an EDI account:
  - Enable the EDIFACT system preference.
  - Go to Administration -> EDI accounts and create an account for your
    vendor.
  - Confirm that the table of orders in your basket still displays
    correctly now that the "Supplier report" column is present.

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Ray Delahunty <r.delahunty@arts.ac.uk>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 8 Martin Renvoize (ashimema) 2023-09-08 20:18:28 UTC
Simple and effective patch. QA script happy and no regressions.

Passing QA
Comment 9 Katrin Fischer 2023-09-11 08:27:31 UTC
This will display the value as it is stored in the database, not taking into account that it's most often linked to an authorised value. But since the AV can vary between fund, maybe this could be solved on a separate follow-up bug?
Comment 10 Tomás Cohen Arazi (tcohen) 2023-09-25 13:49:34 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 11 Fridolin Somers 2023-09-25 19:25:17 UTC
Enhancement not pushed to 23.05.x
Comment 12 Caroline Cyr La Rose 2024-01-11 20:45:26 UTC
Nothing to add to the manual. The table is already listed as being configurable and we don't list the specific columns.