Ticket #354 (closed defect: fixed)

Opened 6 years ago

Last modified 6 years ago

Counting studies is sometimes incorrect

Reported by: robert@… Owned by: robert@…
Priority: major Milestone: 0.6.6
Component: Unknown Version: 0.6.5
Keywords: Cc:
Hardware: Operating system:
Product: URL:


The nice graph on the home screen counts the number of studies. But this number is sometimes incorrect. See the screenshot (-1 studies).

This probably has to do with the fact that the method using Criteria in Study (countReadableStudies for example) returns an incorrect number. The same problem arose with the Study.giveReadableStudies() method. That method sometimes returned the same study multiple times (maybe because of sql joins in hibernate?). I used a unique() filter to solve that problem, but I don't think that will work with criteria.count().


number of studies.png (138.8 KB) - added by robert@… 6 years ago.

Change History

Changed 6 years ago by robert@…

comment:1 Changed 6 years ago by work@…

  • Owner changed from work@… to robert@…
  • Status changed from new to assigned
  • Version changed from 0.6.3 to 0.6.5
  • Milestone set to 0.6.6

resolved in r1623 by using return (c.listDistinct {...}).size() instead. Applied selectDistinct to the other Study methods as well...

removed .unique()s that were added in r1621 in revision r1624 as these double the listDistinct criteria

please retest...

comment:2 Changed 6 years ago by work@…

  • Status changed from assigned to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.