Skip to content

Update Openspecimen to 6.3RC8#1

Open
ChristianMUG wants to merge 3416 commits into
bibbox:masterfrom
krishagni:master
Open

Update Openspecimen to 6.3RC8#1
ChristianMUG wants to merge 3416 commits into
bibbox:masterfrom
krishagni:master

Conversation

@ChristianMUG
Copy link
Copy Markdown

Getting the newest branch from openspecimen

…equired height without

any additional space/padding before or after it.
Part 1: Extracted unpicked list into a separate component.
Part 2: Extracted picked list into a separate component.
Part 4: Remove unused code from different pick list components.
1. Displayed only relevant values in the filter dropdowns of the picked and
unpicked specimens tab.

2. Fixed delete pick list UI
when a shipped-but-unreceived shipment is deleted.
…in both

shipping and deleting shipped shipments.
1) Update record files only if the form contains one or more file fields.

2) Added an index on the columns (form_id, record_id) of the form files table.
   This ensures only the target record is locked, preventing unnecessary locks on
   all rows and reducing lock contention.
…custom-field

record entries into respective dedicated tables. This reduces the number of rows
in the central record-entry table and improves lookup performance.
The use of alias "file" is forbidden as it is a reserved word in Oracle.

Instead of saying so, Oracle spits the following error -
"Caused by: liquibase.exception.DatabaseException: ORA-02012: missing USING keyword"
…en object.

Moved specimen collection and received details from separate event tables into the
core specimen table.

This eliminates the need to query multiple tables (entry, collection, received events)
and reduces logic spread across form handling and specimen business layers.

The result is a more cohesive and maintainable data model.

Performed migrations to:
1) Moved existing collection and received data into the specimen table
2) Updated all saved queries to reference the centralized specimen record
Added a configuration setting to control whether system-based unique IDs (SYS_UIDs)
are generated using a faster, non-contiguous approach.

When the system-level setting is enabled, SYS_UIDs are generated using a fast mode
that trades off sequence contiguity. The requesting thread is not guaranteed to
receive the next sequential ID (i.e., n + 1). However, each new ID is always guaranteed
to be greater than the previous (> n).

When the system-level setting is disabled, fast generation can still be enabled
individually at the label or CP level.

For all other unique ID categories, fast generation must be explicitly enabled within
the label format definition, e.g.: PSPEC_UID(5, fast=true)
for the transfer event's (to/from) container fields.
… tables

to accommodate IPv6 addresses. IPv6 addresses can be 39 characters in length.

Modified tables: OS_AUTH_TOKENS, OS_LOGIN_AUDIT_LOGS, OS_USER_LOGIN_OTPS
…alDate.

To store just dates, LocalDate need to be converted to java.sql.Date
All even rows of the table will have a light grayish background and the odd rows
will have the regular white background.

(Personally, I do not like the Zebra striping idea. I feel it adds more visual
noise than helping users do the data entry.

How will user distinguish between 2 same coloured rows if there was a small
distraction or user has to move their eyes back to the screen?

The right way is to use sticky left columns that display primary attributes of
the row and use it as a reference to decide whether data is being entered in
the right row or not)
the child elements are neatly aligned along the center of vertical
and horizontal axes.
Previously, users were able to create containers with arbitrary dimensions.
In production, we have seen cases like containers or boxes with dimensions
1800 rows x 1 column, which in all likelihood is impractical and unintended.

This leads to performance issues. When allocating the next available position,
the app needs to scan the entire container map and load all occupants to find
the next vacant position. This process would significantly increase the
application memory footprint.

While we intend to optimise the allocation mechansim, until we do so, the fix
is to ensure the containers are of restricted size. By default, containers
are restricted to 225 positions.
Add filters to show
1) only failed query audit logs and
2) to restrict results by the query execution date range.
1) Retain query audit logs for 90 days by default
2) Purge older entries in batches of 1000.
3) Allow the retention period to be configured using the
   queryAuditLogsRetentionDays job parameter.

   Examples:
   queryAuditLogsRetentionDays=120
   queryAuditLogsRetentionDays=30
Send the digest only when the IT/admin email ID is configured.

The digest includes counts of total, successful, and failed query executions,
along with a runtime breakdown of successful queries.

The digest period is derived from the scheduled job frequency. For example,
a daily job includes the last 24 hours of query audit logs.
The index improves purging of old query audit entries, digest report generation,
and filtering audit logs by execution time in the UI.
Add a "Utilisation" tab to container details that reuses the existing
container layout to display child container utilisation.

Each child container cell is color-coded by utilisation level and opens that
child container's utilisation map when clicked.

Calculate utilisation from occupied and free specimen storage positions
across descendant specimen-storing containers.

Display appropriate empty states for dimensionless containers and containers
without child containers.
Add a derived capacity field to container types to indicate how many
specimens can be stored under a container of that type.

Update the capacity whenever the type definition changes, and propagate
capacity changes to parent container types up to the root type.

Add a post-init migration to initialise capacity for existing active
container types.

This supports computing theoretical container capacity for utilisation
heat maps.
Include theoretical capacity from empty child-container slots in
utilisation stats using the parent container type hierarchy.

Compute capacity as: A + B + C
  A: occupied specimen slots
  B: free specimen slots in physical specimen-storing descendants
  C: empty child-container slots * expected child container type capacity

Compute utilisation as: occupied specimen slots / capacity * 100

Return synthetic entries for empty slots when the expected child
container type and capacity are known, including their position labels.

Render empty slots in the utilisation heat map with the same 0%
utilisation treatment as empty physical containers.
Add an export action to the utilisation heatmap UI to generate an
XLSX heatmap report. The report is zipped and returned immediately
when ready within the request timeout; otherwise it is prepared
asynchronously and made available for download.

The XLSX report includes one sheet per eligible container in the
hierarchy, skipping dimensionless containers and containers that do
not store child containers.

Each sheet includes container details followed by the utilisation
heatmap using the same full, high, medium, low, and empty colour
coding as the UI.

The exported heatmap includes physical child containers and theoretical
empty slots where type capacity is available.

Child container cells link to the corresponding container sheet for
easier navigation.
Add a container level specimens-by-type count API and use it to display
the chart for each selected container in the hierarchy instead of only
the root container (aka freezer).

Users can toggle between the utilisation heatmap and specimens chart.
The selected view is preserved in the URL, and chart colours remain
stable by specimen type.
This change introduces query optimisation check before running dynamically
generated queries. Queries that are likely to be very expensive or timeout
are rejected before execution, avoiding unnecessary database load and
thereby reducing the impact on other users.

When a query is rejected, the API records the failure details and
notifies the configured IT administrator.

The email notification includes the original AQL, generated SQL, rejection
reason, user/request context, and the explain plan when available. This
gives administrators the information needed to fine tune indexes, review
query design, or guide users toward more efficient queries.

The optimiser behaviour is configurable at the system level through a new
optimisation settings file. If no custom settings are configured, the API
continues to use the default optimisation rules.

Dynamic Extensions source:
- Built from dynamic_extensions commit: a23c58a5bc4f8cb5b4071b513fed36a2effe217a
Dynamic Extensions source commit:
0ddd1c28e57154bb584384780f4f8aaf59cd7230
The ZIP could be corrupted because the underlying FileOutputStream was
closed before the wrapping ZipOutputStream, preventing ZIP metadata from
being finalised correctly.

Also clean up partial files on failure and validate ZIP entry names
to prevent unsafe path entries.
only if the containerId is of root container or freezer.
…nd retrieval.

Move specimen collection and receive event details out of the core specimen
record into a primary specimen based details record. This avoids repeating
mostly empty fields across non-primary specimens and allows queries to use
a simpler primary specimen link instead of relying on hierarchy based views.

Update the specimen APIs to continue accepting and returning the existing
collection and receive event detail fields. The API remains backward
compatible for callers, while internally the values are now managed through
the new primary specimen details record.

This change improves query scalability for large specimen volumes while
preserving the existing collection and receive details exposed to users.
…formatted positions

1. Store formatted container positions directly on container position records

2. Keep formatted positions updated when container layout, labelling, assignment, or
   dimensions change

3. Backfill formatted positions for existing container positions during migration

4. Update specimen and checkout position fields to use base data tables instead of
   reporting views

5. Expose container details via nested subform fields

6. Migrate saved queries and system workflow files to use the new query model

7. Update bundled workflows, default queries, report settings, and generated AQL to
   use the new query model

8. Drop obsolete/unused specimen position and checkout reporting views
Expose container type name under specimen position and checkout position
container details so queries can count specimens stored in containers of a
specific type per CP.
Remove the earlier CP/CPG request manager path tied to splitting catalog
requests by CP. This prepares the model for request routing through
RequestManagerGroup instead.
Resolve and persist RMG associations during CP create, update, and
copy flows, and during CPG create/update.

Propagate CPG RMG changes to group CPs via CpGroupSettingsApplier, while
preserving CP-specific RMG overrides when the CPG RMG is removed.

Add RMG lookup DAO support and CP bulk import/export schema mapping.
Update existing CP and CPG workflow definitions to use the new nested
specimen position container fields instead of the legacy flattened fields.

Missed in the previous commit.
system workflows JSON was updated during upgrade or not.
…rocessing

Introduce Request Manager Groups (RMGs) as first-class request administration concept.

An RMG has a name and is associated with a user group. Members of the user group act
as request managers for requests assigned to that RMG.

Allow CPs and CPGs to be associated with an RMG, so request ownership can be managed
at the CP level instead of only through catalog level request managers.

When specimen requests are submitted, split them by the effective RMG:
- Specimen-based requests derive the CP, and therefore the RMG, from the specimen.

- Category-based requests derive the CP/RMG from CP ID or CP short title columns
  in the result view.

- Requests that cannot be assigned to an RMG remain unassigned and continue to be
  handled by catalog level request managers.
Do the scrolling only if the node is present in the view/DOM tree
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants