Ticket #354 (closed defect: fixed)

Opened 3 years ago

Last modified 3 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:
Product: Operating system:
URL: Hardware:

Description

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().

Attachments

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

Change History

Changed 3 years ago by robert@…

Changed 3 years ago by work@…

  • status changed from new to assigned
  • owner changed from work@… to robert@…
  • 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...

Changed 3 years ago by work@…

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