← Back to team overview

slub.team team mailing list archive

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

 

Matthias Ronge has proposed merging lp:~zeutschel/goobi-production/bug-983789 into lp:goobi-production.

Requested reviews:
  Ralf Claussnitzer (ralf-claussnitzer)
Related bugs:
  Bug #983789 in Goobi.Production: "database summary table on front page reports wrong user count"
  https://bugs.launchpad.net/goobi-production/+bug/983789

For more details, see:
https://code.launchpad.net/~zeutschel/goobi-production/bug-983789/+merge/102263

Bug fix for bug # 983789
-- 
https://code.launchpad.net/~zeutschel/goobi-production/bug-983789/+merge/102263
Your team Saxon State Library Team is subscribed to branch lp:goobi-production.
=== modified file 'src/de/sub/goobi/forms/StatistikForm.java'
--- src/de/sub/goobi/forms/StatistikForm.java	2012-02-22 07:43:02 +0000
+++ src/de/sub/goobi/forms/StatistikForm.java	2012-04-17 09:29:21 +0000
@@ -52,7 +52,7 @@
 	
 
 	/**
-	 * @return Anzahl aller Literatureintr�ge
+	 * @return Anzahl aller Literatureinträge
 	 * @throws DAOException
 	 */
 	public Integer getAnzahlLiteraturGesamt() {
@@ -62,12 +62,19 @@
 	
 
 	/**
-	 * @return Anzahl der Benutzer
+	 * The function getAnzahlBenutzer() counts the number of user accounts in
+	 * the goobi.production environment. Since user accounts are not hard
+	 * deleted from the database when the delete button is pressed a where
+	 * clause is used in the SQL statement to exclude the deleted accounts from
+	 * the sum.
+	 * 
+	 * @return the count of valid user accounts
 	 * @throws DAOException
-	 */
+	 *             if the current session can't be retrieved or an exception is
+	 *             thrown while performing the rollback.	 */
 	public Long getAnzahlBenutzer() {
 		try {
-			return new BenutzerDAO().count("from Benutzer");
+			return new BenutzerDAO().count("from Benutzer where isVisible is null");
 		} catch (DAOException e) {
 
 			Helper.setFehlerMeldung("fehlerBeimEinlesen", e.getMessage());


Follow ups