Bug 7259 - Show a count of items pending approval on staff client home and tools pages
Summary: Show a count of items pending approval on staff client home and tools pages
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff Client (show other bugs)
Version: 3.6
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Ian Walls
: 6451 (view as bug list)
Depends on: 7875
  Show dependency treegraph
Reported: 2011-11-23 19:24 UTC by Owen Leonard
Modified: 2013-12-05 19:57 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:

Proposed fix (8.27 KB, patch)
2011-11-23 19:30 UTC, Owen Leonard
Details | Diff | Splinter Review
[Signed Off] Bug 7259 - Show a count of items pending approval on staff client home and tools pages (8.44 KB, patch)
2011-11-23 23:00 UTC, Liz Rea
Details | Diff | Splinter Review
Follow-up fix (2.51 KB, patch)
2011-12-07 15:06 UTC, Owen Leonard
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2011-11-23 19:24:35 UTC
The staff client home page and tools page should show a count of items which are pending approval: suggestions, comments and tags.

Screenshot of the proposed revised interfaces:

Staff client home page: http://www.screencast.com/t/PYObAMwHz
Tools page: http://www.screencast.com/t/AxewTrBFxUTy
Comment 1 Owen Leonard 2011-11-23 19:30:48 UTC Comment hidden (obsolete)
Comment 2 Liz Rea 2011-11-23 23:00:27 UTC
Created attachment 6384 [details] [review]
[Signed Off] Bug 7259 - Show a count of items pending approval on staff client home and tools pages

This patch adds count indicators on the staff client home page and
the tools page for the number of items pending approval. On the
home page this includes suggestions, comments, and tags. On the tools
page a count of pending comments and tags is shown.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Counts appear for all types of actionable items listed, all are clickable through to the proper place.

Nice work!
Comment 3 Ian Walls 2011-12-07 13:28:07 UTC
*** Bug 6451 has been marked as a duplicate of this bug. ***
Comment 4 Ian Walls 2011-12-07 13:42:07 UTC
QA comments:

From the code, it appears that if a user can moderate tags, but not comments (or vice versa), they'll see both counts on the intranet-main page, rather than just the type they can moderate.

Changes input params for numberofreviews subroutine.  While all usages of this subroutine are updated (just one), I would recommend adding a default value of 1 to the $status variable, so any code that calls the subroutine will continue to function as before.

Introduces 3 new dependencies into intranet-main.  Not sure there is anything that can be done about that, but it will increase page load time slightly (more just a note here than an actual QA request)

While I cannot envision a situation where folks WOULDN'T want to know about these pending items, should the display of these counts be controlled by a system preference?  This would prevent sudden, surprising change, which can really freak folks out.
Comment 5 Owen Leonard 2011-12-07 15:06:18 UTC
Created attachment 6637 [details] [review]
Follow-up fix

This follow-up, to be applied on top of the first, does the following:

    - Corrects permissions checks on the home page
    - Adds default parameter (1) to numberofreviews subroutine
Comment 6 Ian Walls 2011-12-07 15:16:37 UTC

Thank you for providing those fixes.  I'm happy to sign off on your followup, and pass both patches through QA.
Comment 7 Paul Poulain 2011-12-08 11:07:20 UTC
Patch pushed, please test
Comment 8 Jared Camins-Esakov 2012-05-24 00:45:44 UTC
This was incorporated into 3.6.x prior to 3.6.4.