mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-23 07:13:57 +08:00
Fix version counting in protocol datatable [SCI-7993] (#5019)
This commit is contained in:
parent
fb63c49be5
commit
8906bc25e7
1 changed files with 1 additions and 1 deletions
|
@ -176,7 +176,7 @@ class ProtocolsDatatable < CustomDatatable
|
|||
get_raw_records_base.select(
|
||||
'"protocols".*',
|
||||
'STRING_AGG("protocol_keywords"."name", \', \') AS "protocol_keywords_str"',
|
||||
'COUNT("protocol_versions"."id") + 1 AS "nr_of_versions"',
|
||||
'COUNT(DISTINCT("protocol_versions"."id")) + 1 AS "nr_of_versions"', # User assignments generate duplicates
|
||||
'COUNT("protocol_drafts"."id") AS "nr_of_drafts"',
|
||||
'COUNT("user_assignments"."id") AS "nr_of_assigned_users"',
|
||||
'MAX("users"."full_name") AS "full_username_str"', # "Hack" to get single username
|
||||
|
|
Loading…
Reference in a new issue