Bug 12502 - Add columns for note, order number and ISBN to late orders page
Summary: Add columns for note, order number and ISBN to late orders page
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: David Bourgault
QA Contact:
URL:
Keywords:
: 16722 (view as bug list)
Depends on:
Blocks: 24161
  Show dependency treegraph
 
Reported: 2014-06-30 14:42 UTC by Marjorie Barry-Vila
Modified: 2020-05-16 13:48 UTC (History)
13 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Who signed the patch off:
Text to go in the release notes:
This adds the internal note, vendor note, order number and ISBN to the late orders table. The notes are editable directly from the table using a modal dialog.
Version(s) released in:
20.05.00


Attachments
Bug 12502 - Add vendor and internal note to late orders page (6.48 KB, patch)
2017-09-25 19:21 UTC, David Bourgault
Details | Diff | Splinter Review
Bug 12502 - Add ordernumber and ISBN to late order (3.24 KB, patch)
2017-09-25 19:39 UTC, David Bourgault
Details | Diff | Splinter Review
Bug 12502 - Add vendor and internal note to late orders page (6.64 KB, patch)
2017-10-04 03:52 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 12502 - Add ordernumber and ISBN to late order (3.40 KB, patch)
2017-10-04 03:54 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 12502 - Add vendor and internal note to late orders page (7.00 KB, patch)
2018-02-23 22:53 UTC, Charles Farmer
Details | Diff | Splinter Review
Bug 12502 - Add ordernumber and ISBN to late order (3.40 KB, patch)
2018-02-23 22:53 UTC, Charles Farmer
Details | Diff | Splinter Review
Bug 12502: QA Follow-up (9.22 KB, patch)
2018-02-23 22:53 UTC, Charles Farmer
Details | Diff | Splinter Review
Bug 12502 - Add vendor and internal note to late orders page (7.06 KB, patch)
2018-03-30 20:36 UTC, Charles Farmer
Details | Diff | Splinter Review
Bug 12502 - Add ordernumber and ISBN to late order (3.27 KB, patch)
2018-03-30 20:36 UTC, Charles Farmer
Details | Diff | Splinter Review
Bug 12502 - Add vendor and internal note to late orders page (7.06 KB, patch)
2018-03-30 20:36 UTC, Charles Farmer
Details | Diff | Splinter Review
Bug 12502 - Add ordernumber and ISBN to late order (3.27 KB, patch)
2018-03-30 20:37 UTC, Charles Farmer
Details | Diff | Splinter Review
Bug 12502: QA Follow-up (9.41 KB, patch)
2018-03-30 20:37 UTC, Charles Farmer
Details | Diff | Splinter Review
Bug 12502: Add vendor note, internal note, ordernumber and isbn to late orders page (10.18 KB, patch)
2018-09-21 13:06 UTC, Blou
Details | Diff | Splinter Review
Bug 12502: Add vendor note, internal note, ordernumber and isbn to late orders page (10.32 KB, patch)
2018-10-06 10:00 UTC, Séverine Queune
Details | Diff | Splinter Review
Bug 12502: Add vendor note, internal note, ordernumber and isbn to late orders page (10.34 KB, patch)
2018-10-15 14:21 UTC, Blou
Details | Diff | Splinter Review
Bug 12502: Add vendor note, internal note, ordernumber and isbn to late orders page (10.36 KB, patch)
2019-03-29 20:21 UTC, Pierre-Marc Thibault
Details | Diff | Splinter Review
Bug 12502: (follow-up) Use modal to add/edit order notes (11.04 KB, patch)
2019-07-16 20:14 UTC, Maryse Simard
Details | Diff | Splinter Review
Bug 12502: (QA follow-up) Remove the Save button (903 bytes, patch)
2019-11-14 14:20 UTC, Maryse Simard
Details | Diff | Splinter Review
Bug 12502: (follow-up) Adds formatting for datatables export (6.15 KB, patch)
2019-11-14 14:20 UTC, Maryse Simard
Details | Diff | Splinter Review
Bug 12502: Add vendor note, internal note, ordernumber and isbn to late orders page (10.36 KB, patch)
2019-11-14 16:50 UTC, Séverine Queune
Details | Diff | Splinter Review
Bug 12502: (follow-up) Use modal to add/edit order notes (11.19 KB, patch)
2019-11-14 16:51 UTC, Séverine Queune
Details | Diff | Splinter Review
Bug 12502: (QA follow-up) Remove the Save button (1.03 KB, patch)
2019-11-14 16:51 UTC, Séverine Queune
Details | Diff | Splinter Review
Bug 12502: (follow-up) Adds formatting for datatables export (6.30 KB, patch)
2019-11-14 16:51 UTC, Séverine Queune
Details | Diff | Splinter Review
Bug 12502: Add vendor note, internal note, ordernumber and isbn to late orders page (10.45 KB, patch)
2020-01-16 07:20 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 12502: (follow-up) Use modal to add/edit order notes (11.27 KB, patch)
2020-01-16 07:20 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 12502: (QA follow-up) Remove the Save button (1.09 KB, patch)
2020-01-16 07:20 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 12502: (follow-up) Adds formatting for datatables export (6.37 KB, patch)
2020-01-16 07:20 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Marjorie Barry-Vila 2014-06-30 14:42:10 UTC
Hi, 
it would be fine to have a column for vendor's note in late order page. 
This would be useful to add a note if you know a vendor still has time delivery, a vendor supplier for example.

Regards,

Marjorie
Comment 1 Marjorie Barry-Vila 2014-06-30 14:52:02 UTC
I would add that it would be good to have as a reference to the order number and isbn.

Marjorie
Comment 2 David Bourgault 2017-09-25 19:21:24 UTC Comment hidden (obsolete)
Comment 3 David Bourgault 2017-09-25 19:39:10 UTC Comment hidden (obsolete)
Comment 4 David Bourgault 2017-09-25 19:44:44 UTC Comment hidden (obsolete)
Comment 5 Alex Buckley 2017-10-04 03:52:38 UTC Comment hidden (obsolete)
Comment 6 Alex Buckley 2017-10-04 03:54:27 UTC Comment hidden (obsolete)
Comment 7 Katrin Fischer 2017-12-22 00:41:15 UTC Comment hidden (obsolete)
Comment 8 Katrin Fischer 2017-12-23 08:17:00 UTC Comment hidden (obsolete)
Comment 9 Katrin Fischer 2017-12-28 16:38:11 UTC Comment hidden (obsolete)
Comment 10 Charles Farmer 2018-02-23 22:53:28 UTC Comment hidden (obsolete)
Comment 11 Charles Farmer 2018-02-23 22:53:31 UTC Comment hidden (obsolete)
Comment 12 Charles Farmer 2018-02-23 22:53:34 UTC Comment hidden (obsolete)
Comment 13 Séverine Queune 2018-03-13 09:08:47 UTC Comment hidden (obsolete)
Comment 14 Charles Farmer 2018-03-30 20:36:02 UTC Comment hidden (obsolete)
Comment 15 Charles Farmer 2018-03-30 20:36:07 UTC Comment hidden (obsolete)
Comment 16 Charles Farmer 2018-03-30 20:36:57 UTC Comment hidden (obsolete)
Comment 17 Charles Farmer 2018-03-30 20:37:02 UTC Comment hidden (obsolete)
Comment 18 Charles Farmer 2018-03-30 20:37:06 UTC Comment hidden (obsolete)
Comment 19 Katrin Fischer 2018-09-21 06:21:13 UTC
It would be great if this could be rebased.
Comment 20 Blou 2018-09-21 13:06:32 UTC Comment hidden (obsolete)
Comment 21 Blou 2018-09-21 13:12:15 UTC
Request and you shall receive.

Ran qa-test on it, fixed issues, squashed, but did not test.
Comment 22 Séverine Queune 2018-10-06 10:00:58 UTC Comment hidden (obsolete)
Comment 23 Katrin Fischer 2018-10-10 21:38:38 UTC
Can you please fix the issues pointed out by the QA script? I could fix the filtes, but not sure about the first:

 FAIL	acqui/lateorders.pl
   FAIL	  critic
		# Variables::ProhibitUnusedVariables: Got 1 violation(s). 

 FAIL	koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt
   FAIL	  filters
		missing_filter at line 84 (                [% lateorder.ordernumber %])
		missing_filter at line 143 (            <td><input name="vendornote" id="vendornote" type="text" value="[% lateorder.vendornote %]"></td>)
		missing_filter at line 144 (            <td>[% lateorder.isbn %]</td>)
		missing_filter at line 142 (            <td><input name="internalnote" id="internalnote" type="text" value="[% lateorder.internalnote %]"></td>)
		missing_filter at line 269 (                $("#savenotes").after("<span id=\"loading\" style=\"margin:4px;\"><img src=\"[% interface %]/[% theme %]/img/loading-small.gif\" alt=\"\" /> "+_("Loading")+"</span>");)
Comment 24 Blou 2018-10-12 15:15:07 UTC
Hi Katrin, 
are you talking about koha-qa.pl ?  I seem to have the latest version, and am not getting those messages.  Any parameter I'm missing?
Comment 25 Katrin Fischer 2018-10-14 14:51:00 UTC
Hi Blou,
that's trange. What's the latest commit you have? Did you move to the new repository?
https://gitlab.com/koha-community/qa-test-tools
Comment 26 Blou 2018-10-15 12:20:10 UTC
My last commit:
Jonathan Druart : Make sure commit messages are correctly formatted (6 months ago)
Comment 27 Katrin Fischer 2018-10-15 12:27:15 UTC
You are not using the right repository (we moved a lot of them), last change was only 3 weeks ago, see the link above and here: https://gitlab.com/koha-community/qa-test-tools/commits/master
Comment 28 Blou 2018-10-15 14:21:31 UTC Comment hidden (obsolete)
Comment 29 Katrin Fischer 2018-10-21 11:43:13 UTC
Next time as a separate follow-up patch please! ;)

Looking at this again I have some issues, I am sorry to come up with this a little lately :(

1) Usability
There is visual indicator to tell apart an already stored from a changed/unsafed note. It's really easy to forget to press the button. 

If you happen to end your note with pressing "Enter" you trigger the error message "No order selected"

It really doen't work well for notes that are longer than the input field is. They don't display in full and it's hard to move around in the input field.

I think I'd like this much better following the existing design pattern with links and a modal (see basket summary). I am adding Owen in hope he has time to take a look.

2) Search
Searching on the notes column doesn't work.

3) Export
The notes are not exported, neither using the "Export as CSV" nor the new "Excel" export at the bottom of the table.
Comment 30 Owen Leonard 2018-10-22 12:51:06 UTC
(In reply to Katrin Fischer from comment #29)
 
> 2) Search
> Searching on the notes column doesn't work.
> 
> 3) Export
> The notes are not exported, neither using the "Export as CSV" nor the new
> "Excel" export at the bottom of the table.

I think using the link + modal model from acqui/basket.pl would work well here. I think it would solve both of these problems, each caused by the fact that the table cell contains an input field instead of text.
Comment 31 Pierre-Marc Thibault 2019-02-20 22:07:04 UTC
I quickly tried the solution of Owen. I'm in a state where CSV works, but only the one from the top, I guess I should do something else to make it work.

I tried to add the modal and the links, the result looks fine, but there is something I would like to ask about it. Should the description comes along with the icon? When I add an icon to add or edit a note with the description (i.e. Edit internal note), the description is exported as well. If the description is not here, it's well exported. Since I don't find how to hide only the description and am not even sure if it should be there in the first place, I ask if the link's description should be added too.
Comment 32 Pierre-Marc Thibault 2019-03-29 20:21:03 UTC
Created attachment 87236 [details] [review]
Bug 12502: Add vendor note, internal note, ordernumber and isbn to late orders page

Test plan:

0) Make sure you have a late order
    a) Create a test vendor unless you have one
    b) Create a test basket unless you have one
    c) Close the basket to mark the order as late
1) Go to the late orders table
Before patch : Orderno, ISBN, vendor notes, internal notes are absent
After patch: fields are present

2) Edit the vendor note and/or the internal note
3) Press the save notes button
4) Refresh page and cache (CTRL+F5), if notes have been correctly saved, your modifications should be displayed.

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 33 Pierre-Marc Thibault 2019-03-29 20:22:36 UTC
Patch rebased. I am still waiting for advises before continuing.
Comment 34 Séverine Queune 2019-04-18 12:40:51 UTC
(In reply to Katrin Fischer from comment #29)
> Next time as a separate follow-up patch please! ;)
> 
> Looking at this again I have some issues, I am sorry to come up with this a
> little lately :(
> 
> 1) Usability
> There is visual indicator to tell apart an already stored from a
> changed/unsafed note. It's really easy to forget to press the button. 
> 
> If you happen to end your note with pressing "Enter" you trigger the error
> message "No order selected"
> 
> It really doen't work well for notes that are longer than the input field
> is. They don't display in full and it's hard to move around in the input
> field.
> 
> I think I'd like this much better following the existing design pattern with
> links and a modal (see basket summary). I am adding Owen in hope he has time
> to take a look.
> 
> 2) Search
> Searching on the notes column doesn't work.
> 
> 3) Export
> The notes are not exported, neither using the "Export as CSV" nor the new
> "Excel" export at the bottom of the table.

Sorry Pierre-Marc, all the issues Katrin noticed on comment 29 are still present.
Comment 35 Maryse Simard 2019-07-16 20:14:45 UTC
Created attachment 91564 [details] [review]
Bug 12502: (follow-up) Use modal to add/edit order notes

Replace inputs to edit notes by a link opening a modal, similar
to the basket summary page. This makes it possible for the notes
to appear in the datatable exports.

Also fix exporting with the export as csv button at the bottom
of the page to export notes.

Test plan :
1) In the late orders table (acqui/lateorders.pl), a link should
appear in both the internal and vendor note column, following the
current value if it exist.
    -> This link should read "Add ..." if there is no existing note
    or "Edit ..." if there is.
2) Click on the link. A modal should appear. Confirm that saving a
note works as expected.
3) Try exporting to any format using either the button at the top
of the table or the one at the bottom of the page.
    -> The three new columns and their values should appear in the
    export.
Comment 36 Maryse Simard 2019-07-16 20:16:53 UTC
Used links + modal for editing the notes and fixed the exports.

However, as Pierre-Marc mentioned, when exporting, the labels for the links do appear in the data ("Add internal note", ...). I feel that this is not optimal, but since the same behavior is present in the basket page as well, I left it as is.
Comment 37 Séverine Queune 2019-10-03 08:45:02 UTC
I have some questions.

If I use the Export option at the top of the table, only the displayed datas are exported (hide columns / perform a search). If I use the Export option at the bottom, all datas for the selected orders are exported even the hidden ones. Is that the expected behaviour ?

The "Save notes" button now seems useless as datas are automatically saved using the modal, can you confirm ?

I agree with Pierre-Marc : the label of "Add / Edit note" should not be exported.
I will open a new ticket to fix it on the basket export because it adds work for the staff working on acquisition to suppress these informations before sending the file to the vendor. Will you agree to suppress it in the present patch ?

Except these points, patch works fine !
Comment 38 Maryse Simard 2019-11-14 14:20:41 UTC
Created attachment 95418 [details] [review]
Bug 12502: (QA follow-up) Remove the Save button
Comment 39 Maryse Simard 2019-11-14 14:20:45 UTC
Created attachment 95419 [details] [review]
Bug 12502: (follow-up) Adds formatting for datatables export

Add a format option to the datatables export that remove .noExport
elements present in a data cell, just as .noExport columns are
not exported.

To test:
1. For late orders (which uses .noExport elements in data cells) :
    Export data in any format using the export button at the top
    of the datatable.
        => data should exclude "Add/Edit note" label, but
        otherwise look the same as before the patch.
2. Try exporting data in other datatables in Koha and make sure
exported data is the same before and after applying the patch.
Comment 40 Maryse Simard 2019-11-14 14:21:00 UTC
Thank you for testing and for your comment.

I would say the different behaviors for the export buttons is expected since the button as the top is a part of the datatables plugin and uses it's filters to determine which row to export and the button at the bottom is part of Koha and uses the checkboxes to filter rows to export. I agree this behavior might be questionable, but I believe it is not in the scope of this bug which is about order notes.

I did forget to remove the "Save notes" button, thank you for the catch.

I've also added a patch to remove the "Add/Edit note" label. It adds a new formatting option to the datatables to accept the use of the .noExport class on data cell elements to remove them from exported data.

It is now ready to be tested again.
Comment 41 Séverine Queune 2019-11-14 16:50:57 UTC
Created attachment 95438 [details] [review]
Bug 12502: Add vendor note, internal note, ordernumber and isbn to late orders page

Test plan:

0) Make sure you have a late order
    a) Create a test vendor unless you have one
    b) Create a test basket unless you have one
    c) Close the basket to mark the order as late
1) Go to the late orders table
Before patch : Orderno, ISBN, vendor notes, internal notes are absent
After patch: fields are present

2) Edit the vendor note and/or the internal note
3) Press the save notes button
4) Refresh page and cache (CTRL+F5), if notes have been correctly saved, your modifications should be displayed.

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 42 Séverine Queune 2019-11-14 16:51:03 UTC
Created attachment 95439 [details] [review]
Bug 12502: (follow-up) Use modal to add/edit order notes

Replace inputs to edit notes by a link opening a modal, similar
to the basket summary page. This makes it possible for the notes
to appear in the datatable exports.

Also fix exporting with the export as csv button at the bottom
of the page to export notes.

Test plan :
1) In the late orders table (acqui/lateorders.pl), a link should
appear in both the internal and vendor note column, following the
current value if it exist.
    -> This link should read "Add ..." if there is no existing note
    or "Edit ..." if there is.
2) Click on the link. A modal should appear. Confirm that saving a
note works as expected.
3) Try exporting to any format using either the button at the top
of the table or the one at the bottom of the page.
    -> The three new columns and their values should appear in the
    export.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 43 Séverine Queune 2019-11-14 16:51:09 UTC
Created attachment 95440 [details] [review]
Bug 12502: (QA follow-up) Remove the Save button

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 44 Séverine Queune 2019-11-14 16:51:15 UTC
Created attachment 95441 [details] [review]
Bug 12502: (follow-up) Adds formatting for datatables export

Add a format option to the datatables export that remove .noExport
elements present in a data cell, just as .noExport columns are
not exported.

To test:
1. For late orders (which uses .noExport elements in data cells) :
    Export data in any format using the export button at the top
    of the datatable.
        => data should exclude "Add/Edit note" label, but
        otherwise look the same as before the patch.
2. Try exporting data in other datatables in Koha and make sure
exported data is the same before and after applying the patch.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 45 Séverine Queune 2019-11-14 16:54:52 UTC
Thank you Maryse ! 
The new version is ok for me :)
Comment 46 Katrin Fischer 2020-01-16 07:20:05 UTC
Created attachment 97427 [details] [review]
Bug 12502: Add vendor note, internal note, ordernumber and isbn to late orders page

Test plan:

0) Make sure you have a late order
    a) Create a test vendor unless you have one
    b) Create a test basket unless you have one
    c) Close the basket to mark the order as late
1) Go to the late orders table
Before patch : Orderno, ISBN, vendor notes, internal notes are absent
After patch: fields are present

2) Edit the vendor note and/or the internal note
3) Press the save notes button
4) Refresh page and cache (CTRL+F5), if notes have been correctly saved, your modifications should be displayed.

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 47 Katrin Fischer 2020-01-16 07:20:10 UTC
Created attachment 97428 [details] [review]
Bug 12502: (follow-up) Use modal to add/edit order notes

Replace inputs to edit notes by a link opening a modal, similar
to the basket summary page. This makes it possible for the notes
to appear in the datatable exports.

Also fix exporting with the export as csv button at the bottom
of the page to export notes.

Test plan :
1) In the late orders table (acqui/lateorders.pl), a link should
appear in both the internal and vendor note column, following the
current value if it exist.
    -> This link should read "Add ..." if there is no existing note
    or "Edit ..." if there is.
2) Click on the link. A modal should appear. Confirm that saving a
note works as expected.
3) Try exporting to any format using either the button at the top
of the table or the one at the bottom of the page.
    -> The three new columns and their values should appear in the
    export.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 48 Katrin Fischer 2020-01-16 07:20:14 UTC
Created attachment 97429 [details] [review]
Bug 12502: (QA follow-up) Remove the Save button

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 49 Katrin Fischer 2020-01-16 07:20:19 UTC
Created attachment 97430 [details] [review]
Bug 12502: (follow-up) Adds formatting for datatables export

Add a format option to the datatables export that remove .noExport
elements present in a data cell, just as .noExport columns are
not exported.

To test:
1. For late orders (which uses .noExport elements in data cells) :
    Export data in any format using the export button at the top
    of the datatable.
        => data should exclude "Add/Edit note" label, but
        otherwise look the same as before the patch.
2. Try exporting data in other datatables in Koha and make sure
exported data is the same before and after applying the patch.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 50 Katrin Fischer 2020-01-16 07:20:49 UTC
Thx a lot for your patience with this one - I feel it works really nicely now!

Also passes prove t/db_dependent/Acquisition.t.
Comment 51 Martin Renvoize 2020-01-20 16:34:11 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 52 Joy Nelson 2020-01-21 18:36:59 UTC
Enhancement not backported to 19.11.x branch
Comment 53 Joy Nelson 2020-02-01 00:01:31 UTC
Enhancement not backported to 19.11.x branch