Merge lp:~zeutschel/goobi-production/bug-983789 into lp:goobi-production/1.7

Proposed by Matthias Ronge
Status: Merged
Approved by: Ralf Claussnitzer
Approved revision: 54
Merged at revision: 63
Proposed branch: lp:~zeutschel/goobi-production/bug-983789
Merge into: lp:goobi-production/1.7
Diff against target: 35 lines (+11/-4)
1 file modified
src/de/sub/goobi/forms/StatistikForm.java (+11/-4)
To merge this branch: bzr merge lp:~zeutschel/goobi-production/bug-983789
Reviewer Review Type Date Requested Status
Ralf Claussnitzer (community) Approve
Review via email: mp+103667@code.launchpad.net

This proposal supersedes a proposal from 2012-04-17.

Description of the change

This bug fix only removes deleted users from the statistics count. You said:
----
Certainly, deleted users should not be taken into account.
----
Therefore, this fix should be merged.

To post a comment you must log in.
Revision history for this message
Ralf Claussnitzer (ralf-claussnitzer-deactivatedaccount) wrote : Posted in a previous version of this proposal
review: Needs Information
Revision history for this message
Ralf Claussnitzer (ralf-claussnitzer-deactivatedaccount) wrote :

Sorry if I got you wrong on this:

>>>>
By now, inactive users are being counted. I don’t know the reasons why accounts are being set to inactive − or if that feature is used at all. I am in favour to keep this behaviour while nobody complains.
<<<

By "this behaviour" you mean the behaviour introduced by your bug fix?

Revision history for this message
Matthias Ronge (matthias-ronge) wrote :

Yes, without the fix, deleted users are counted, too.

Revision history for this message
Ralf Claussnitzer (ralf-claussnitzer-deactivatedaccount) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/de/sub/goobi/forms/StatistikForm.java'
2--- src/de/sub/goobi/forms/StatistikForm.java 2012-02-22 07:43:02 +0000
3+++ src/de/sub/goobi/forms/StatistikForm.java 2012-04-26 11:20:02 +0000
4@@ -52,7 +52,7 @@
5
6
7 /**
8- * @return Anzahl aller Literatureintr�ge
9+ * @return Anzahl aller Literatureinträge
10 * @throws DAOException
11 */
12 public Integer getAnzahlLiteraturGesamt() {
13@@ -62,12 +62,19 @@
14
15
16 /**
17- * @return Anzahl der Benutzer
18+ * The function getAnzahlBenutzer() counts the number of user accounts in
19+ * the goobi.production environment. Since user accounts are not hard
20+ * deleted from the database when the delete button is pressed a where
21+ * clause is used in the SQL statement to exclude the deleted accounts from
22+ * the sum.
23+ *
24+ * @return the count of valid user accounts
25 * @throws DAOException
26- */
27+ * if the current session can't be retrieved or an exception is
28+ * thrown while performing the rollback. */
29 public Long getAnzahlBenutzer() {
30 try {
31- return new BenutzerDAO().count("from Benutzer");
32+ return new BenutzerDAO().count("from Benutzer where isVisible is null");
33 } catch (DAOException e) {
34
35 Helper.setFehlerMeldung("fehlerBeimEinlesen", e.getMessage());

Subscribers

People subscribed via source and target branches