[Bug 41553] New: Add fund code to fund pulldown for order editor ( neworderempty.pl )
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41553 Bug ID: 41553 Summary: Add fund code to fund pulldown for order editor ( neworderempty.pl ) Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Acquisitions Assignee: koha-bugs@lists.koha-community.org Reporter: kyle@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org It's possible to give multiple funds the same name. It would be helpful to have the fund code in the pulldown options to help disambiguate these funds. -- 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=41553 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |kyle@bywatersolutions.com |ity.org | -- 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=41553 --- Comment #1 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 191035 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=191035&action=edit Bug 41553: Add fund code to fund pulldown for order editor ( neworderempty.pl ) It's possible to give multiple funds the same name. It would be helpful to have the fund code in the pulldown options to help disambiguate these funds. In addition, spans with classes have been added to both the fund name and the fund code for ease of styling. Test Plan: 1) Create 2 funds with the same name and different fund codes 2) Apply this patch 3) Restart all the things! 4) Create a new order, note the fund code is displayed after the fund name -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41553 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41553 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41553 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #191035|0 |1 is obsolete| | --- Comment #2 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 191036 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=191036&action=edit Bug 41553: Add fund code to fund pulldown for order editor ( neworderempty.pl ) It's possible to give multiple funds the same name. It would be helpful to have the fund code in the pulldown options to help disambiguate these funds. In addition, spans with classes have been added to both the fund name and the fund code for ease of styling. Test Plan: 1) Create 2 funds with the same name and different fund codes 2) Apply this patch 3) Restart all the things! 4) Create a new order, note the fund code is displayed after the fund name -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41553 --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I feel like this change adds some inconsistency to the display, as only the fund menu on creating new orders is changed. Also: I know some libraries already add the fund code to the description if needed, so that would create a doubled up display for them. Can you explain why updating the description is not an option here? Wouldn't it be better to add the budget to the view, as fund code and fund description could still likely be the same across multiple budget years? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41553 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=21098 --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Maybe a solution along the lines of bug 21098? This would add more consistency and might also solve the use case. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41553 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #5 from David Cook <dcook@prosentient.com.au> --- (In reply to Katrin Fischer from comment #4)
Maybe a solution along the lines of bug 21098? This would add more consistency and might also solve the use case.
Yeah I reckon bug 21098 would be the way to go -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41553 --- Comment #6 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- (In reply to David Cook from comment #5)
(In reply to Katrin Fischer from comment #4)
Maybe a solution along the lines of bug 21098? This would add more consistency and might also solve the use case.
Yeah I reckon bug 21098 would be the way to go
Are you saying to implement optgroups to group funds by budget? I don't believe this would actually solve this problem, as one could still have to funds under a single budget with the same name. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41553 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew@bywatersolutions.com --- Comment #7 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- I agree that the changes described in Bug 21098 don't seem to address the issue here. In discussing this issue with a library today, they expressed their desire to see *only* the fund code when entering a new order. Coupled with Katrin's point about libraries who would find it redundant to see both values, this suggests we need a configuration option asking whether to show the code, the description, or both. Additionally, it might make sense to apply whatever changes we make here to the fund dropdown in the receiving modal as well. Perhaps that's another bug. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41553 --- Comment #8 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- (In reply to Andrew Fuerste-Henry from comment #7)
In discussing this issue with a library today, they expressed their desire to see *only* the fund code when entering a new order. Coupled with Katrin's point about libraries who would find it redundant to see both values, this suggests we need a configuration option asking whether to show the code, the description, or both.
It's been pointed out to me that Kyle gave the code and description distinct classes, so either can be easily hidden with CSS. To my mind, that sidesteps this issue. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41553 David Nind <david@davidnind.com> 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=41553 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #191036|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=41553 --- Comment #9 from David Nind <david@davidnind.com> --- Created attachment 192683 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192683&action=edit Bug 41553: Add fund code to fund pulldown for order editor ( neworderempty.pl ) It's possible to give multiple funds the same name. It would be helpful to have the fund code in the pulldown options to help disambiguate these funds. In addition, spans with classes have been added to both the fund name and the fund code for ease of styling. Test Plan: 1) Create 2 funds with the same name and different fund codes 2) Apply this patch 3) Restart all the things! 4) Create a new order, note the fund code is displayed after the fund name Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41553 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com Text to go in the| |It's possible to give release notes| |multiple funds the same | |name. | | | |This adds the fund code | |after the fund name (in | |brackets) in the fund | |dropdown list when adding | |an item to an order. | | | |In addition, spans with | |classes have been added to | |both the fund name and the | |fund code for ease of | |styling: | |- budget_name | |- budget_code --- Comment #10 from David Nind <david@davidnind.com> --- I've signed ff. However, I'm not sure if all the issues raised in the comments need addressing, or are resolved. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41553 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Add fund code to fund |Add fund code to the fund |pulldown for order editor ( |dropdown list when adding |neworderempty.pl ) |an item to an order | |(neworderempty.pl) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41553 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #11 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- (In reply to Andrew Fuerste-Henry from comment #8)
It's been pointed out to me that Kyle gave the code and description distinct classes, so either can be easily hidden with CSS. To my mind, that sidesteps this issue.
I posted this based on the code, without looking at the actual interface. Turns out the use of select2 strips the html out of the menu options so these don't have distinct classes after all. For that reason, I'm kicking this to FQA. This needs at least a way to preserve current behavior of showing only the fund name, if not also a way to show only the code. Preliminary googling suggests that select2 templating can allow html within the options list, allowing the fund and code to have classes and be hidden/shown via CSS. A note on Kyle's existing code here, he's got the fund code in parentheses, with the parentheses also within the .budget_code class. That'd mean if one hid the .budget_name the resulting list would be all codes in parens, which is not ideal. We should avoid that. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41553 --- Comment #12 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- (In reply to Andrew Fuerste-Henry from comment #11)
(In reply to Andrew Fuerste-Henry from comment #8)
It's been pointed out to me that Kyle gave the code and description distinct classes, so either can be easily hidden with CSS. To my mind, that sidesteps this issue.
I posted this based on the code, without looking at the actual interface. Turns out the use of select2 strips the html out of the menu options so these don't have distinct classes after all. For that reason, I'm kicking this to FQA. This needs at least a way to preserve current behavior of showing only the fund name, if not also a way to show only the code.
Preliminary googling suggests that select2 templating can allow html within the options list, allowing the fund and code to have classes and be hidden/shown via CSS.
A note on Kyle's existing code here, he's got the fund code in parentheses, with the parentheses also within the .budget_code class. That'd mean if one hid the .budget_name the resulting list would be all codes in parens, which is not ideal. We should avoid that.
Based on this, I think the correct answer is indeed to add a syspref as you wrote previously. Do you agree? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41553 --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Thanks Andrew for having second look and testing the behavior, much appreciated! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41553 --- Comment #14 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- (In reply to Kyle M Hall (khall) from comment #12)
Based on this, I think the correct answer is indeed to add a syspref as you wrote previously. Do you agree?
A syspref would work and might be the simpler option in the end. Alternatively, we could use custom templating to insert the desired html into the options in the select2 dropdown. https://forums.select2.org/t/add-html-into-select-options/193 https://stackoverflow.com/questions/36360783/how-to-render-html-in-select2-o... We could construct it to show something like: Some fund: CODE123 With markup of <span class="budget_name">Some fund</span><span class="budget_separator">: </span><span class="budget_code">Code123</span> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41553 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41553 --- Comment #15 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 192832 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192832&action=edit Bug 41553: Add new syspref OrderLineFundInfo Patch from commit e03755a -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41553 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #192832|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=41553 --- Comment #16 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 192833 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192833&action=edit Bug 41553: Add new syspref OrderLineFundInfo Patch from commit 67104d2 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41553 --- Comment #17 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Updated test plan: 1 - create one or more funds for which the fund code is not the same as the fund name (default funds in KTD all have codes that match their names, which makes testing here difficult) 2 - add a new order to a basket, confirm that the Fund dropdown on the New Order page only shows fund names 3 - apply patch, updatedatabase, restart_all 4 - confirm you now have the OrderLineFundInfo system preference and it is set to "fund name" at update 5 - add a new order to a basket, confirm that the Fund dropdown on the New Order page only shows fund names 6 - Set OrderLineFundInfo to "fund code" 7 - add a new order to a basket, confirm that the Fund dropdown on the New Order page only shows fund codes 8 - Set OrderLineFundInfo to "fund code and name" 9 - add a new order to a basket, confirm that the Fund dropdown on the New Order page only shows both fund codes and fund names -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41553 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the|It's possible to give |This enhancement adds a release notes|multiple funds the same |system preference to |name. |control how funds are | |displayed when entering a |This adds the fund code |new order in acquisitions. |after the fund name (in |Using the new system |brackets) in the fund |preference |dropdown list when adding |OrderLineFundInfo, one may |an item to an order. |select whether to see the | |fund name (current |In addition, spans with |behavior), the fund code, |classes have been added to |or both values. When both |both the fund name and the |values are displayed, the |fund code for ease of |fund code is displayed in |styling: |parentheses after the fund |- budget_name |name. |- budget_code | Severity|minor |enhancement -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41553 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the|This enhancement adds a |This enhancement adds a release notes|system preference to |system preference to |control how funds are |control how funds are |displayed when entering a |displayed when entering a |new order in acquisitions. |new order in acquisitions. |Using the new system |Using the new system |preference |preference |OrderLineFundInfo, one may |OrderLineFundInfo, one may |select whether to see the |select whether to see the |fund name (current |fund name (current |behavior), the fund code, |behavior), the fund code, |or both values. When both |or both values. When both |values are displayed, the |values are displayed, the |fund code is displayed in |fund name is displayed in |parentheses after the fund |parentheses after the fund |name. |code. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41553 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the|This enhancement adds a |This enhancement adds a release notes|system preference to |system preference to |control how funds are |control how funds are |displayed when entering a |displayed when entering a |new order in acquisitions. |new order in acquisitions. |Using the new system |Using the new system |preference |preference |OrderLineFundInfo, one may |OrderLineFundInfo, one may |select whether to see the |select whether to see the |fund name (current |fund name (current |behavior), the fund code, |behavior), the fund code, |or both values. When both |or both values. When both |values are displayed, the |values are displayed, the |fund name is displayed in |fund code is displayed in |parentheses after the fund |parentheses after the fund |code. |name. --- Comment #18 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Apologies for mucking with release notes. I set my test site up confusingly and confused myself. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41553 Andrew Fuerste-Henry <andrew@bywatersolutions.com> 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=41553 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #192683|0 |1 is obsolete| | --- Comment #19 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 193154 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193154&action=edit Bug 41553: Add fund code to fund pulldown for order editor ( neworderempty.pl ) It's possible to give multiple funds the same name. It would be helpful to have the fund code in the pulldown options to help disambiguate these funds. In addition, spans with classes have been added to both the fund name and the fund code for ease of styling. Test Plan: 1) Create 2 funds with the same name and different fund codes 2) Apply this patch 3) Restart all the things! 4) Create a new order, note the fund code is displayed after the fund name Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Amy Peck <apeck@fplct.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41553 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #192833|0 |1 is obsolete| | --- Comment #20 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 193155 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193155&action=edit Bug 41553: Add new syspref OrderLineFundInfo Signed-off-by: Amy Peck <apeck@fplct.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41553 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |13944 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13944 [Bug 13944] Fund sorting is inconsistent across different parts of Koha -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41553 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the|This enhancement adds a |This enhancement adds a release notes|system preference to |system preference to |control how funds are |control how funds are |displayed when entering a |displayed when entering a |new order in acquisitions. |new order in acquisitions. |Using the new system |Using the new system |preference |preference |OrderLineFundInfo, one may |OrderLineFundInfo, you can |select whether to see the |choose to show just the |fund name (current |fund name (current |behavior), the fund code, |behavior), the fund code, |or both values. When both |or both values. When both |values are displayed, the |values are displayed, the |fund code is displayed in |fund code is displayed in |parentheses after the fund |parentheses after the fund |name. |name. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org