[Bug 14388] New: add sorting to funds
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14388 Bug ID: 14388 Summary: add sorting to funds Change sponsored?: --- Product: Koha Version: master Hardware: All URL: cgi-bin/koha/acqui/acqui-home.pl OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Acquisitions Assignee: koha-bugs@lists.koha-community.org Reporter: nengard@gmail.com QA Contact: testopia@bugs.koha-community.org The list of funds on this page (cgi-bin/koha/acqui/acqui-home.pl) has no sorting in place. It should sort on fund name or code or something useful to help people find the fund they want. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14388 Nicole C. Engard <nengard@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=12984 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14388 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14388 --- Comment #1 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 40765 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40765&action=edit Bug 14388: Funds should be sorted by budget_code Before this patch, the funds were sorted by budget_id, which does not make any sense. This patch adds a sort by budget_code on the fund list (acqui/acqui-home.pl and admin/aqbudgets.pl) Test plan: On both pages (acqui/acqui-home.pl and admin/aqbudgets.pl) confirm that the funds are now sorted by fund code (DB column budget_code) -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14388 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |normal Assignee|koha-bugs@lists.koha-commun |jonathan.druart@biblibre.co |ity.org |m CC| |jonathan.druart@biblibre.co | |m -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14388 --- Comment #2 from M. Tompsett <mtompset@hotmail.com> --- Comment on attachment 40765 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40765 Bug 14388: Funds should be sorted by budget_code Review of attachment 40765: --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=14388&attachment=40765) ----------------------------------------------------------------- ::: t/db_dependent/Budgets.t @@ +428,5 @@
);
$budget_hierarchy = GetBudgetHierarchy($budget_period_id); +is( $budget_hierarchy->[0]->{children}->[0]->{budget_name}, 'budget_11', 'GetBudgetHierarchy should return budgets ordered by name, first child is budget_11' ); +is( $budget_hierarchy->[0]->{children}->[1]->{budget_name}, 'budget_12', 'GetBudgetHierarchy should return budgets ordered by name, first child is budget_12' );
second child, not first. Please fix typo. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14388 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtompset@hotmail.com --- Comment #3 from M. Tompsett <mtompset@hotmail.com> --- I was not able to duplicate issue with Debian Jessie on Master. Though, this patch clearly forces sorting. Additionally, tests failed to run with my initial data set. Requires CPL. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14388 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=14388 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #40765|0 |1 is obsolete| | --- Comment #4 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 40855 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40855&action=edit Bug 14388: Funds should be sorted by budget_code Before this patch, the funds were sorted by budget_id, which does not make any sense. This patch adds a sort by budget_code on the fund list (acqui/acqui-home.pl and admin/aqbudgets.pl) Test plan: On both pages (acqui/acqui-home.pl and admin/aqbudgets.pl) confirm that the funds are now sorted by fund code (DB column budget_code) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14388 --- Comment #5 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to M. Tompsett from comment #2)
second child, not first. Please fix typo.
Fixed, thanks (In reply to M. Tompsett from comment #3)
I was not able to duplicate issue with Debian Jessie on Master. Though, this patch clearly forces sorting.
They are currently sorted by budget_id.
Additionally, tests failed to run with my initial data set. Requires CPL.
Which is the case for almost all tests. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14388 --- Comment #6 from M. Tompsett <mtompset@hotmail.com> --- I wrote:
I was not able to duplicate issue with Debian Jessie on Master. Though, this patch clearly forces sorting.
(In reply to Jonathan Druart from comment #5)
They are currently sorted by budget_id.
My screen says otherwise. I'm wondering if this is a hashes are stored in a random order issue, because it ordered 2,1,3 on my screen without the patch. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14388 Zeno Tajoli <z.tajoli@cineca.it> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14388 Joonas Kylmälä <j.kylmala@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |j.kylmala@gmail.com --- Comment #7 from Joonas Kylmälä <j.kylmala@gmail.com> --- (In reply to M. Tompsett from comment #6)
I wrote:
I was not able to duplicate issue with Debian Jessie on Master. Though, this patch clearly forces sorting.
(In reply to Jonathan Druart from comment #5)
They are currently sorted by budget_id.
My screen says otherwise. I'm wondering if this is a hashes are stored in a random order issue, because it ordered 2,1,3 on my screen without the patch.
Mine too. But this happened only when I had first applied the patch and then retracted it. Before I applied the patch they were ordered by the budget_id. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14388 --- Comment #8 from Joonas Kylmälä <j.kylmala@gmail.com> --- (In reply to Joonas Kylmälä from comment #7)
(In reply to M. Tompsett from comment #6)
I wrote:
I was not able to duplicate issue with Debian Jessie on Master. Though, this patch clearly forces sorting.
(In reply to Jonathan Druart from comment #5)
They are currently sorted by budget_id.
My screen says otherwise. I'm wondering if this is a hashes are stored in a random order issue, because it ordered 2,1,3 on my screen without the patch.
Mine too. But this happened only when I had first applied the patch and then retracted it. Before I applied the patch they were ordered by the budget_id.
It happened because in acqui-home.tt there is a javascript line which states: 'aaSortingFixed': [[ 1, 'asc' ]], So the table shown to the user is sorted with that. I'm just wondering why it started to only work after I applied the patch... -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14388 Nicole C. Engard <nengard@gmail.com> 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=14388 Nicole C. Engard <nengard@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #40855|0 |1 is obsolete| | --- Comment #9 from Nicole C. Engard <nengard@gmail.com> --- Created attachment 44248 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44248&action=edit Bug 14388: Funds should be sorted by budget_code Before this patch, the funds were sorted by budget_id, which does not make any sense. This patch adds a sort by budget_code on the fund list (acqui/acqui-home.pl and admin/aqbudgets.pl) Test plan: On both pages (acqui/acqui-home.pl and admin/aqbudgets.pl) confirm that the funds are now sorted by fund code (DB column budget_code) Signed-off-by: Nicole Engard <nengard@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14388 --- Comment #10 from Joonas Kylmälä <j.kylmala@gmail.com> --- Do we need this patch? The funds are in sorted order even without this patch in acqui/acqui-home.pl. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14388 --- Comment #11 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Joonas Kylmälä from comment #10)
Do we need this patch? The funds are in sorted order even without this patch in acqui/acqui-home.pl.
No, they are not. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14388 --- Comment #12 from Joonas Kylmälä <j.kylmala@gmail.com> --- Created attachment 44538 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44538&action=edit Budget order without the patch Jonathan, isn't it here ordered by budget code? Is the patch trying to have the list in this order as shown in the picture? If not, could you please explain me what it tries to do. (I understand that the patch changes the order in the html level (before JS)) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14388 --- Comment #13 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Joonas Kylmälä from comment #12)
Created attachment 44538 [details] Budget order without the patch
Jonathan, isn't it here ordered by budget code? Is the patch trying to have the list in this order as shown in the picture? If not, could you please explain me what it tries to do. (I understand that the patch changes the order in the html level (before JS))
You have only 1 fund per budget, so you cannot see the sort issue :) Try and create 4 funds: fund_1_1, fund_0_1, fund_1_0, fund_0_0 (in this order) for the same budget. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14388 --- Comment #14 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- And keep in mind: A budget is related to the aqbudgetperiods table and the $budget_period variable, a fund is related to the budgets table and the $budget variable. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14388 --- Comment #15 from Joonas Kylmälä <j.kylmala@gmail.com> --- (In reply to Jonathan Druart from comment #13)
You have only 1 fund per budget, so you cannot see the sort issue :) Try and create 4 funds: fund_1_1, fund_0_1, fund_1_0, fund_0_0 (in this order) for the same budget.
Oh, I see. I thought all this time that it was about sorting the different budgets... And now I see that even the title says funds :-D -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14388 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14388 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #44248|0 |1 is obsolete| | --- Comment #16 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 44624 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44624&action=edit [PASSED QA] Bug 14388: Funds should be sorted by budget_code Before this patch, the funds were sorted by budget_id, which does not make any sense. This patch adds a sort by budget_code on the fund list (acqui/acqui-home.pl and admin/aqbudgets.pl) Test plan: On both pages (acqui/acqui-home.pl and admin/aqbudgets.pl) confirm that the funds are now sorted by fund code (DB column budget_code) Signed-off-by: Nicole Engard <nengard@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14388 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |tomascohen@gmail.com --- Comment #17 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patch pushed to master. Thanks Jonathan! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14388 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |frederic@tamil.fr --- Comment #18 from Frédéric Demians <frederic@tamil.fr> --- This patch has been pushed to 3.20.x, will be in 3.20.6. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14388 Liz Rea <liz@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |liz@catalyst.net.nz --- Comment #19 from Liz Rea <liz@catalyst.net.nz> --- Pushed to 3.18.13, and released. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org