Release notes
=============

Update from 2.5.0 to 2.6.0
--------------------------

**IMPORTANT: Allocate Sufficient Time for This Upgrade**

Version 2.6.0 introduces a number of significant changes that require careful
planning. If you maintain custom add-ons, you should take time to review the
update and assess whether your code will need adjustments.

A key highlight of this release is the migration of many content types from
Archetypes (AT) to Dexterity (DX). This is part of the broader effort to
modernize the codebase and move closer to full Python 3 compatibility.
As a result, the following content types have been migrated:

``AnalysisCategories``, ``AnalysisCategory``, ``AnalysisProfiles``,
``AnalysisProfile``, ``AttachmentTypes``, ``AttachmentType``, ``BatchLabels``,
``BatchLabel``, ``ContainerTypes``, ``ContainerType``, ``Departments``,
``Department``, ``InstrumentTypes``, ``InstrumentType``, ``LabProducts``,
``LabProduct``, ``Manufacturers``, ``Manufacturer``, ``Preservations``,
``Preservation``, ``SampleConditions``, ``SampleCondition``,
``SampleMatrices``, ``SampleMatrix``, ``SamplePoints``, ``SamplePoint``,
``SampleTemplates``, ``SampleTemplate``, ``SampleTypes``, ``SampleType``,
``SamplingDeviations``, ``SamplingDeviation``, ``StorageLocations``,
``StorageLocation``, ``SubGroups``, ``SubGroup``, ``Suppliers``, ``Supplier``,
``WorksheetTemplates``, ``WorksheetTemplate``.

If you have any extenders or modifiers attached to these types in your own
add-ons, you will need to port that functionality to use Dexterity behaviors.

In addition to the migration, version 2.6.0 introduces various improvements
across the platform. Some of the most notable enhancements include support for
Limit of Quantification (LOQ), improved handling of uncertainty values, better
performance of analysis verification, a revamped sticker engine, new paste
capabilities in sample registration, enhanced worksheet management, and the
ability to remove users and customize user contact information. The release
also includes refinements to result entry, multi-result analysis
specifications, more robust catalog indexing, and many bug fixes and visual
improvements across the user interface.

Several long-standing bugs have been addressed as well, including issues with
result entry, catalog indexing, permissions, rejections, and Unicode handling.
Performance improvements were made for analysis verification and recalculation,
and additional developer utilities were added to the API.

Please note that the upgrade process may take a considerable amount of time.
This is primarily due to upgrade step 2654, which involves processing and
migrating a large amount of catalog data. Be prepared for a longer-than-usual
upgrade window, especially for large databases.

This release has been thoroughly tested with Plone 5.2.15 and 5.2.14. For best
compatibility and stability, it is strongly recommended that you pin your
buildout to one of these versions when upgrading.

To ensure a smooth upgrade process, we also recommend taking a few
precautionary steps beforehand:

- Run a `zeopack` to compact the database
- Create a full backup of your code and database
- Ensure as many analyses as possible are in *Verified* or *Published* status
- Stop any non-essential services or applications to free up memory
- Clear or rotate log files to begin with a clean slate


Update from 2.0.0 to 2.1.0
--------------------------

!!! This update requires at least Plone 5.2.5 and Python 2.x. !!!

Please update your `buildout.cfg` configuration file to this version and re-run
the `buildout` script.

You can use the Plone unified installer to install Plone 5.x first:
https://github.com/plone/Installers-UnifiedInstaller

Please make sure to pin `senaite.lims` to version `2.1.0` to get the correct
versions of all dependent SENAITE packages.


Update from 1.3.x to 2.0.0
--------------------------

!!! This update requires at least Plone 5.2.4 and Python 2.x. !!!

Please update your `buildout.cfg` configuration file to this version and re-run
the `buildout` script.

You can use the Plone unified installer to install Plone 5.x first:
https://github.com/plone/Installers-UnifiedInstaller

Please make sure to pin `senaite.lims` to version `2.0.0` to get the correct
versions of all dependent SENAITE packages.

Run first the Plone upgrade before you continue to update SENAITE to version 2.x.


Update from 1.3.0 to 1.3.1
--------------------------

**IMPORTANT: Plan the upgrade with enough time**

This update might take long depending on the number of objects registered in
the system:

- Stale Sample and Partition objects have been removed from ZODB
  https://github.com/senaite/senaite.core/pull/1351

- Full Audit log has been added to Senaite
  https://github.com/senaite/senaite.core/pull/1324

If you have your own add-on, please review the changes to check beforehand
if some parts of your add-on require modifications. Worth to mention that the
following tips are strongly recommended before proceeding with the upgrade:

- Do a zeopack
- Do a backup of both your code and database
- Try to have as much analyses in verified/published statuses as possible
- Stop unnecessary applications and services that may consume RAM
- Start with a clean log file


Update from 1.2.9 to 1.3.0
--------------------------

**IMPORTANT: Plan the upgrade with enough time**

Version 1.3.0 is not a hotfix release, it rather comes with a lot of changes
that require additional care when planning the update. If you have your own
add-on, please review the changes to check beforehand if some parts of your
add-on require modifications.

This update will take long (up to 5h for instances with large amounts of data).
Therefore, is recommended to plan and allocate enough resources for the process
to complete beforehand. For big databases, RAM is a critical factor to be
considered before upgrading. Worth to mention that the following tips are
strongly recommended before proceeding with the upgrade:

- Do a zeopack
- Do a backup of both your code and database
- Try to have as much analyses in verified/published statuses as possible
- Stop unnecessary applications and services that may consume RAM
- Start with a clean log file

Most of the base code has been refactored keeping in mind the following
objectives:

- Less complexity: less code, better code
- High test coverage: lower chance of undetected bugs
- Boost performance: better experience, with no delays
- Improve security: rely on Zope's security policies
- Code responsibility: focus on core functionalities and let other add-ons to
  deal with the rest (`senaite.lims`, `senaite.core.listing`, etc.)

Besides of this refactoring, this version also comes with a myriad of new
functionalities and enhancements: full-fledged sample partitions, reinvented
listings and results entry, new adapters for extensibility, etc.

Version 1.3 is the result of hard, but exciting work at same time. Four months
of walking through valleys of tears and fighting hydras. Four exciting months to
be proud of.


Update from 1.2.8 to 1.2.9
--------------------------

**IMPORTANT: Plan the upgrade with enough time**
This update might take long depending on the number of Analyses, Analysis
Requests and Samples registered in the system:

- Role mappings updated for Analaysis Requests and Samples (rejection)
  https://github.com/senaite/senaite.core/pull/1041

- Recatalog of invalidated/retest Analysis Requests (invalidation)
  https://github.com/senaite/senaite.core/pull/1027

- Reindex and recatalog of getDueDate for Analysis Requests
  https://github.com/senaite/senaite.core/pull/1051

- Reindex of getDueDate for Analyses:
  https://github.com/senaite/senaite.core/pull/1032

- Workflow: `retract_ar` transition has been renamed to `invalidate`
  https://github.com/senaite/senaite.core/pull/1027


Update from 1.2.7 to 1.2.8
--------------------------

- Operators for min and max values have been added. For specifications already
  present in the system, the result ranges are considered as bounded and closed:
  `[min,max] = {result | min <= result <= max}`.
  https://github.com/senaite/senaite.core/pull/965


Update from 1.2.4 to 1.2.5
--------------------------

- This update requires the execution of `bin/buildout`, because
  Products.TextIndexNG3 has been added. It will help to search by wildcards in
  TextIndexNG3 indexes instead of looking for the keyword inside wildcards.
  For now, it is used only in AR listing catalog.
  https://pypi.python.org/pypi/Products.TextIndexNG3/

- This update might take long depending on the number of Analyses registered in
  the system, because the upgrade step will walk through all analyses in order
  to update those that do not have a valid (non-floatable) duplicate variation
  value (see #768).


Update from 1.2.3 to 1.2.4
--------------------------

- This update requires the execution of `bin/buildout`, because WeasyPrint has
  been updated to version 0.42.2:
  http://weasyprint.readthedocs.io/en/stable/changelog.html#version-0-42-2


Update from 1.2.2 to 1.2.3
--------------------------

- IMPORTANT: Plan the upgrade with enough time
  This update might take long depending on the number of Analysis Requests
  registered in the system because a new index and column 'assigned_state' has
  been added in Analysis Requests catalog, that require the catalog to be
  reindexed (see #637).


Update from 1.2.1 to 1.2.2
--------------------------

- IMPORTANT: Plan the upgrade with enough time
  This update might take long depending on the number of Batches registered in
  the system, because an index from their catalog needs to be reindexed (#574).
  Also, a new index that affects the Worksheets that have a Worksheet Template
  assigned has been added and needs to be indexed.


Update from 1.2.0 to 1.2.1
--------------------------

- This update requires the execution of `bin/buildout`, because a new dependency has
  been added: `Plone Subrequest <https://pypi.python.org/pypi/plone.subrequest/>`_

- With this update, Analyses Services that are inactive, but have active
  dependent services, will be automatically transitioned to `active` state. This
  procedure fixes eventual inconsistencies amongst the statuses of Analyses
  Services. See #555
