[Koha-bugs] [Bug 29628] Purchase suggestion link on staff main page should always show, even if logged in branch has 0 suggestions
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29628 Andreas Roussos changed: What|Removed |Added CC||a.rous...@dataly.gr --- Comment #10 from Andreas Roussos --- (In reply to Lucas Gass from comment #8) > (In reply to Katrin Fischer from comment #6) > > Hi Lucas, can you please check if this is a duplicate to bug 29571? > > Katrin, looks like a duplicate to me. I will close this one but I am curious > if Bug 29571 needs Andreas's follow-up. I am unable to reproduce the edge > case. Hi Lucas -- by all means, please feel free to close this bug ;-) Jonathan's fix in Bug 29571 is much shorter/cleaner than my follow-up patch here, and also deals with the edge case I described. FWIW, the edge case would manifest after applying the initial patch submitted for this bug, since in the template file koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt 178 [% IF ( CAN_user_suggestions_suggestions_manage && pendingsuggestions ) %] was changed to 178 [% IF ( CAN_user_suggestions_suggestions_manage && all_pendingsuggestions ) %] In mainpage.pl, the template parameter `all_pendingsuggestions` would be equal to 0 if the number of pending suggestions in the currently selected branch is equal to the number of pending suggestions across all branches (see line 90 below): 86 my $pendingsuggestions = Koha::Suggestions->search({ status => "ASKED" }); 87 my $local_pendingsuggestions_count = $pendingsuggestions->search({ 'me.branchcode' => C4::Context->userenv()->{'branch'} })->count(); 88 my $pendingsuggestions_count = $pendingsuggestions->count(); 89 $template->param( 90 all_pendingsuggestions => $pendingsuggestions_count != $local_pendingsuggestions_count ? $pendingsuggestions_count : 0, 91 pendingsuggestions => $local_pendingsuggestions_count 92 ); Thus, the condition inside the template [% IF %] block would be false and the "Suggestions pending approval:" text would not appear at all. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 29628] Purchase suggestion link on staff main page should always show, even if logged in branch has 0 suggestions
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29628 Lucas Gass changed: What|Removed |Added Resolution|--- |DUPLICATE Status|Signed Off |RESOLVED --- Comment #9 from Lucas Gass --- *** This bug has been marked as a duplicate of bug 29571 *** -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 29628] Purchase suggestion link on staff main page should always show, even if logged in branch has 0 suggestions
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29628 --- Comment #8 from Lucas Gass --- (In reply to Katrin Fischer from comment #6) > Hi Lucas, can you please check if this is a duplicate to bug 29571? Katrin, looks like a duplicate to me. I will close this one but I am curious if Bug 29571 needs Andreas's follow-up. I am unable to reproduce the edge case. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 29628] Purchase suggestion link on staff main page should always show, even if logged in branch has 0 suggestions
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29628 --- Comment #7 from David Nind --- Thanks Katrin! I was sure I had signed of something similar, but I couldn't find it... (and it was only a week ago!) -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 29628] Purchase suggestion link on staff main page should always show, even if logged in branch has 0 suggestions
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29628 --- Comment #6 from Katrin Fischer --- Hi Lucas, can you please check if this is a duplicate to bug 29571? -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 29628] Purchase suggestion link on staff main page should always show, even if logged in branch has 0 suggestions
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29628 David Nind changed: What|Removed |Added Summary|purchase suggestion link on |Purchase suggestion link on |staff main page should |staff main page should |always show, even if logged |always show, even if logged |in branch has 0 suggestions |in branch has 0 suggestions -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 29628] purchase suggestion link on staff main page should always show, even if logged in branch has 0 suggestions
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29628 --- Comment #5 from David Nind --- I wasn't able to replicate the edge case in the follow-up patch. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 29628] purchase suggestion link on staff main page should always show, even if logged in branch has 0 suggestions
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29628 David Nind changed: What|Removed |Added Text to go in the|This fixes the display of |This fixes the display of release notes|suggestions pending on the |suggestions pending |staff interface home page |approval section on the |will always show, even if |staff interface home page |the current library has no |so that it always shows, |suggestions. For example: |even if the current library |Suggestions pending |has no suggestions. For |approval: Centerville: 0 / |example: Suggestions |All libraries: 2|pending approval: ||Centerville: 0 / All ||libraries: 2 -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 29628] purchase suggestion link on staff main page should always show, even if logged in branch has 0 suggestions
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29628 David Nind changed: What|Removed |Added Text to go in the||This fixes the display of release notes||suggestions pending on the ||staff interface home page ||will always show, even if ||the current library has no ||suggestions. For example: ||Suggestions pending ||approval: Centerville: 0 / ||All libraries: 2 CC||da...@davidnind.com -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 29628] purchase suggestion link on staff main page should always show, even if logged in branch has 0 suggestions
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29628 David Nind changed: What|Removed |Added Attachment #128220|0 |1 is obsolete|| --- Comment #4 from David Nind --- Created attachment 128243 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128243=edit Bug 29628: (follow-up) fix for rare edge case When the number of pending suggestions in the currently selected branch is equal to the number of pending suggestions across all branches, the `all_pendingsuggestions` template parameter is equal to 0. This results in the "Suggestions pending approval:" block not being printed at all. This follow-up patch fixes that. Also fixed is the display of pending suggestions in Home > Acquisitions. Test plan: 1) Apply this patch. 2) Create two Library branches; submit two suggestions in each one. 3) Visit the Home page, and also visit Home > Acquisitions: you should only see "${BRANCH_CODE}: 2" suggestions pending approval, regardless of the branch you have selected using the 'Set library' menu option. 4) Delete both suggestions from the 1st branch, and set your library to be the 1st branch. 5) Visit the same pages: this time "${BRANCH_CODE}: 0 / All libraries: 2" is displayed. 6) Set your library to be the 2nd branch, and visit the same two pages: this time "${BRANCH_CODE}: 2" is displayed. Signed-off-by: David Nind -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 29628] purchase suggestion link on staff main page should always show, even if logged in branch has 0 suggestions
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29628 David Nind changed: What|Removed |Added Attachment #128188|0 |1 is obsolete|| --- Comment #3 from David Nind --- Created attachment 128242 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128242=edit Bug 29628: Show purchase suggestion link when there are any suggestions systemwide To test: 1. Make some purchase suggestions at different branches. 2. Log in to a branch with a suggestion and visit /cgi-bin/koha/mainpage.pl 3. See something like: Suggestions pending approval: Centerville: 1 / All libraries: 2 4. Log into a branch with no suggestions, no link about suggestions 5. Apply patch 6. Repeat step 2, and still see something like: Centerville: 1 / All libraries: 2 7. Try a branch with no suggestions, now you see a link like: Centerville: 0 / All libraries: 2 Signed-off-by: David Nind -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 29628] purchase suggestion link on staff main page should always show, even if logged in branch has 0 suggestions
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29628 David Nind changed: What|Removed |Added Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 29628] purchase suggestion link on staff main page should always show, even if logged in branch has 0 suggestions
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29628 --- Comment #2 from Andreas Roussos --- Created attachment 128220 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128220=edit Bug 29628: (follow-up) fix for rare edge case When the number of pending suggestions in the currently selected branch is equal to the number of pending suggestions across all branches, the `all_pendingsuggestions` template parameter is equal to 0. This results in the "Suggestions pending approval:" block not being printed at all. This follow-up patch fixes that. Also fixed is the display of pending suggestions in Home > Acquisitions. Test plan: 1) Apply this patch. 2) Create two Library branches; submit two suggestions in each one. 3) Visit the Home page, and also visit Home > Acquisitions: you should only see "${BRANCH_CODE}: 2" suggestions pending approval, regardless of the branch you have selected using the 'Set library' menu option. 4) Delete both suggestions from the 1st branch, and set your library to be the 1st branch. 5) Visit the same pages: this time "${BRANCH_CODE}: 0 / All libraries: 2" is displayed. 6) Set your library to be the 2nd branch, and visit the same two pages: this time "${BRANCH_CODE}: 2" is displayed. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 29628] purchase suggestion link on staff main page should always show, even if logged in branch has 0 suggestions
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29628 Lucas Gass changed: What|Removed |Added Assignee|koha-b...@lists.koha-commun |lu...@bywatersolutions.com |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 29628] purchase suggestion link on staff main page should always show, even if logged in branch has 0 suggestions
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29628 --- Comment #1 from Lucas Gass --- Created attachment 128188 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128188=edit Bug 29628: Show purchase suggestion link when there are any suggestions systemwide To test: 1. Make some purchase suggestions at different branches. 2. Log in to a branch with a suggestion and visit /cgi-bin/koha/mainpage.pl 3. See something like: Suggestions pending approval: Centerville: 1 / All libraries: 2 4. Log into a branch with no suggestions, no link about suggestions 5. Apply patch 6. Repeat step 2, and still see something like: Centerville: 1 / All libraries: 2 7. Try a branch with no suggestions, now you see a link like: Centerville: 0 / All libraries: 2 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 29628] purchase suggestion link on staff main page should always show, even if logged in branch has 0 suggestions
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29628 Lucas Gass 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. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/