From 2dadad2441ca4b5a2788bfef6c06d3459809993f Mon Sep 17 00:00:00 2001 From: Ramon Bartl Date: Thu, 18 Aug 2022 22:41:01 +0200 Subject: [PATCH 1/2] Fix allow sample partitions in submitted states This fixes the regression in PR-2024 for PR-1839: - https://github.com/senaite/senaite.core/pull/1839 - https://github.com/senaite/senaite.core/pull/2024 --- .../workflows/senaite_sample_workflow/definition.xml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/senaite/core/profiles/default/workflows/senaite_sample_workflow/definition.xml b/src/senaite/core/profiles/default/workflows/senaite_sample_workflow/definition.xml index 0522e7a80d..db24d60367 100644 --- a/src/senaite/core/profiles/default/workflows/senaite_sample_workflow/definition.xml +++ b/src/senaite/core/profiles/default/workflows/senaite_sample_workflow/definition.xml @@ -599,6 +599,7 @@ + @@ -622,7 +623,7 @@ - + @@ -787,6 +788,7 @@ + @@ -810,7 +812,7 @@ - + @@ -889,6 +891,7 @@ + @@ -908,7 +911,7 @@ - + From 824130eb25ae085912ec097ee69ee63100045444 Mon Sep 17 00:00:00 2001 From: Ramon Bartl Date: Fri, 19 Aug 2022 13:34:56 +0200 Subject: [PATCH 2/2] Fixed test --- .../WorkflowAnalysisRequestCreatePartitions.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/senaite/core/tests/doctests/WorkflowAnalysisRequestCreatePartitions.rst b/src/senaite/core/tests/doctests/WorkflowAnalysisRequestCreatePartitions.rst index f3fd4658a0..33f6750acd 100644 --- a/src/senaite/core/tests/doctests/WorkflowAnalysisRequestCreatePartitions.rst +++ b/src/senaite/core/tests/doctests/WorkflowAnalysisRequestCreatePartitions.rst @@ -91,13 +91,13 @@ Submit all analyses: ... analysis.setResult(12) ... success = do_action_for(analysis, "submit") -Partitions cannot be created when the status is `to_be_verified`: +Partitions can be created when the status is `to_be_verified`: >>> api.get_workflow_status_of(ar) 'to_be_verified' >>> isTransitionAllowed(ar, "create_partitions") - False + True Verify all analyses: @@ -106,22 +106,22 @@ Verify all analyses: ... success = do_action_for(analysis, "verify") >>> setup.setSelfVerificationEnabled(False) -Partitions cannot be created when the status is `verified`: +Partitions can be created when the status is `verified`: >>> api.get_workflow_status_of(ar) 'verified' >>> isTransitionAllowed(ar, "create_partitions") - False + True -Partitions cannot be created when the status is `published`: +Partitions can be created when the status is `published`: >>> success = do_action_for(ar, "publish") >>> api.get_workflow_status_of(ar) 'published' >>> isTransitionAllowed(ar, "create_partitions") - False + True Partitions cannot be created when the status is `invalid`: