[Bug 14393] New: Add collection code filter to inventory
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14393 Bug ID: 14393 Summary: Add collection code filter to inventory Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Tools Assignee: gmcharlt@gmail.com Reporter: dcook@prosentient.com.au QA Contact: testopia@bugs.koha-community.org Add the ability to do inventory by collection code as well. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14393 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |dcook@prosentient.com.au --- Comment #1 from David Cook <dcook@prosentient.com.au> --- I think that this should actually be fairly straightforward. I should have a patch for this tomorrow... -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14393 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14393 --- Comment #2 from David Cook <dcook@prosentient.com.au> --- Created attachment 40209 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40209&action=edit Bug 14393 - Add collection code filter to inventory This patch adds the ability to do inventory by collection. _TEST PLAN_ Before applying: 1) Go to "Tools > Inventory/stocktaking" 2) Note that there is no "Collection code:" option Optionally: 2b) You can create a Barcode file with a single barcode 2c) Don't select anything from "Select items you want to check" (or filter if you know how to filter to make it faster... doesn't matter) 2d) Click "Submit" at the bottom of the screen 2e) Note that there is no "Collection code" column in the screen output or CSV output (ie with/without the "Export to CSV file" box ticked before submitting) Apply the patch. After applying: 3) Note that there is a "Collection code" filter on the main inventory screen 4) Create a Barcode file with a single barcode for an item with a collection and upload it using the "Choose file" button. 5) Select that item's collection code from the "Collection code" filter 6) Click "Submit" 7) Note that the screen output and the CSV output contains a "Collection code" column (ie with/without the "Export to CSV file" box ticked before submitting) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14393 Indranil Das Gupta <indradg@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |indradg@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14393 --- Comment #3 from Marc Véron <veron@veron.ch> --- Created attachment 40255 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40255&action=edit [Signed-off] Bug 14393 - Add collection code filter to inventory This patch adds the ability to do inventory by collection. _TEST PLAN_ Before applying: 1) Go to "Tools > Inventory/stocktaking" 2) Note that there is no "Collection code:" option Optionally: 2b) You can create a Barcode file with a single barcode 2c) Don't select anything from "Select items you want to check" (or filter if you know how to filter to make it faster... doesn't matter) 2d) Click "Submit" at the bottom of the screen 2e) Note that there is no "Collection code" column in the screen output or CSV output (ie with/without the "Export to CSV file" box ticked before submitting) Apply the patch. After applying: 3) Note that there is a "Collection code" filter on the main inventory screen 4) Create a Barcode file with a single barcode for an item with a collection and upload it using the "Choose file" button. 5) Select that item's collection code from the "Collection code" filter 6) Click "Submit" 7) Note that the screen output and the CSV output contains a "Collection code" column (ie with/without the "Export to CSV file" box ticked before submitting) Followed test plan. Works as expected. Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14393 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |veron@veron.ch Attachment #40209|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14393 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14393 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@biblibre.co | |m Status|Signed Off |Failed QA --- Comment #4 from Jonathan Druart <jonathan.druart@biblibre.com> --- David, In my dev installation, items.ccode is not mapped. Which makes the dropdown list populated with all my authorized values :) You certainly need to care about the value of AdvancedSearchTypes, you will have to propose item type too. Marked as Failed QA. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14393 --- Comment #5 from David Cook <dcook@prosentient.com.au> --- (In reply to Jonathan Druart from comment #4)
David,
In my dev installation, items.ccode is not mapped. Which makes the dropdown list populated with all my authorized values :) You certainly need to care about the value of AdvancedSearchTypes, you will have to propose item type too.
Marked as Failed QA.
I'm not sure what you mean by "You certainly need to care about the value of AdvancedSearchTypes, you will have to propose item type too". Could you clarify? I'll look into the problem with the mapping in the meantime though :) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14393 --- Comment #6 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to David Cook from comment #5)
(In reply to Jonathan Druart from comment #4)
David,
In my dev installation, items.ccode is not mapped. Which makes the dropdown list populated with all my authorized values :) You certainly need to care about the value of AdvancedSearchTypes, you will have to propose item type too.
Marked as Failed QA.
I'm not sure what you mean by "You certainly need to care about the value of AdvancedSearchTypes, you will have to propose item type too". Could you clarify?
Some libraries don't use this ccode value, it's the case in my installation. I this case, the dropdown list is wrongly populated with all authorized values! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14393 --- Comment #7 from David Cook <dcook@prosentient.com.au> --- (In reply to Jonathan Druart from comment #6)
Some libraries don't use this ccode value, it's the case in my installation. I this case, the dropdown list is wrongly populated with all authorized values!
Cool beans. I'll look into it :) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14393 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14393 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #40255|0 |1 is obsolete| | --- Comment #8 from David Cook <dcook@prosentient.com.au> --- Created attachment 40958 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40958&action=edit Bug 14393 - Add collection code filter to inventory This patch adds the ability to do inventory by collection. _TEST PLAN_ Before applying: 1) Go to "Tools > Inventory/stocktaking" 2) Note that there is no "Collection code:" option Optionally: 2b) You can create a Barcode file with a single barcode 2c) Don't select anything from "Select items you want to check" (or filter if you know how to filter to make it faster... doesn't matter) 2d) Click "Submit" at the bottom of the screen 2e) Note that there is no "Collection code" column in the screen output or CSV output (ie with/without the "Export to CSV file" box ticked before submitting) Apply the patch. After applying: 3) Note that there is a "Collection code" filter on the main inventory screen 4) Create a Barcode file with a single barcode for an item with a collection and upload it using the "Choose file" button. 5) Select that item's collection code from the "Collection code" filter 6) Click "Submit" 7) Note that the screen output and the CSV output contains a "Collection code" column (ie with/without the "Export to CSV file" box ticked before submitting) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14393 --- Comment #9 from David Cook <dcook@prosentient.com.au> --- (In reply to Jonathan Druart from comment #6)
Some libraries don't use this ccode value, it's the case in my installation. I this case, the dropdown list is wrongly populated with all authorized values!
Could you give that a look? That should be a lot better now... thanks for looking at this bug! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14393 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |frederic@tamil.fr --- Comment #10 from Frédéric Demians <frederic@tamil.fr> ---
Could you give that a look? That should be a lot better now... thanks for looking at this bug!
Comment 6 is solved. When items.ccode isn't linked to a populated AV list, the collection code selection list isn't displayed in Inventory. I see that in the inventory result table, there is a new columun 'Collection code' which is displayed even when there isn't CCODE AV. Do you think there is a way to display or not this column? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14393 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14393 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #40958|0 |1 is obsolete| | --- Comment #11 from Frédéric Demians <frederic@tamil.fr> --- Created attachment 44772 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44772&action=edit Bug 14393 - Add collection code filter to inventory This patch adds the ability to do inventory by collection. _TEST PLAN_ Before applying: 1) Go to "Tools > Inventory/stocktaking" 2) Note that there is no "Collection code:" option Optionally: 2b) You can create a Barcode file with a single barcode 2c) Don't select anything from "Select items you want to check" (or filter if you know how to filter to make it faster... doesn't matter) 2d) Click "Submit" at the bottom of the screen 2e) Note that there is no "Collection code" column in the screen output or CSV output (ie with/without the "Export to CSV file" box ticked before submitting) Apply the patch. After applying: 3) Note that there is a "Collection code" filter on the main inventory screen 4) Create a Barcode file with a single barcode for an item with a collection and upload it using the "Choose file" button. 5) Select that item's collection code from the "Collection code" filter 6) Click "Submit" 7) Note that the screen output and the CSV output contains a "Collection code" column (ie with/without the "Export to CSV file" box ticked before submitting) Note: Collection code isn't displayed on Inventory filter & result if ccode isn't used in items. Signed-off-by: Frederic Demians <f.demians@tamil.fr> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14393 --- Comment #12 from Frédéric Demians <frederic@tamil.fr> --- (In reply to Frédéric Demians from comment #10)
I see that in the inventory result table, there is a new columun 'Collection code' which is displayed even when there isn't CCODE AV. Do you think there is a way to display or not this column?
Forget this. I've added a [% IF %] in your patch that I've signed off in order to not display this column when unnecessary. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14393 --- Comment #13 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Comment on attachment 44772 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44772 Bug 14393 - Add collection code filter to inventory Review of attachment 44772: --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=14393&attachment=44772) ----------------------------------------------------------------- ::: tools/inventory.pl @@ +95,5 @@
} push @authorised_value_list,@$data; } + + my $collection_authorised_value = C4::Koha::GetAuthValCode("items.ccode", $fwkcode);
Does it really necessary to check all frameworks? Isn't be enough to get the default one? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14393 --- Comment #14 from David Cook <dcook@prosentient.com.au> --- (In reply to Frédéric Demians from comment #12)
Forget this. I've added a [% IF %] in your patch that I've signed off in order to not display this column when unnecessary.
Cheers, Frédéric :) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14393 --- Comment #15 from David Cook <dcook@prosentient.com.au> --- Comment on attachment 44772 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44772 Bug 14393 - Add collection code filter to inventory Review of attachment 44772: --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=14393&attachment=44772) ----------------------------------------------------------------- ::: tools/inventory.pl @@ +95,5 @@
} push @authorised_value_list,@$data; } + + my $collection_authorised_value = C4::Koha::GetAuthValCode("items.ccode", $fwkcode);
In practice, it might be enough to get the default one, but in theory you could use different authorized value categories than "CCODE" for "item.ccode" depending on the framework of the biblio to which an item is attached. Originally, I just used the default framework, but then realized that it wasn't necessarily comprehensive enough. In practice, I don't know if anyone would map multiple categories to "item.ccode", but it is theoretically possible. You might only allow certain collections for a certain framework. Framework A might use "CCODE" which refers to textual collections while Framework B might use "CCODE2"which refers to audiovisual collections. That would probably be madness, but it's possible madness. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14393 --- Comment #16 from David Cook <dcook@prosentient.com.au> --- ^ that last comment was for Jonathan. Perhaps I should've just replied to the comment rather than on the splinter review... -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14393 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #17 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- You are right, it's theoretically possible... but in my opinoin not recommendable. Think about features like item batch editing or any search form/report that offers you a list of collections. It will cause lots of inconvenience if someone does that. I think we don't need to cover this possibility. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14393 --- Comment #18 from David Cook <dcook@prosentient.com.au> --- (In reply to Katrin Fischer from comment #17)
You are right, it's theoretically possible... but in my opinoin not recommendable. Think about features like item batch editing or any search form/report that offers you a list of collections. It will cause lots of inconvenience if someone does that. I think we don't need to cover this possibility.
Ok. I'm fine with that. I was mostly just following the pattern that already existed in the script. Other things than collection code do this same check. Should a follow-up remove this "all framework checking" for all criteria? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14393 --- Comment #19 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to David Cook from comment #18)
(In reply to Katrin Fischer from comment #17)
You are right, it's theoretically possible... but in my opinoin not recommendable. Think about features like item batch editing or any search form/report that offers you a list of collections. It will cause lots of inconvenience if someone does that. I think we don't need to cover this possibility.
Ok. I'm fine with that. I was mostly just following the pattern that already existed in the script. Other things than collection code do this same check. Should a follow-up remove this "all framework checking" for all criteria?
I would prefer to keep it, to avoid undesired side-effects. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14393 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14393 --- Comment #20 from David Cook <dcook@prosentient.com.au> --- (In reply to Jonathan Druart from comment #19)
I would prefer to keep it, to avoid undesired side-effects.
That also seems reasonable. I'm happy to go with whatever QA decides in the end. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org