| Total Complexity | 0 |
| Total Lines | 115 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | # -*- coding: utf-8 -*- |
||
| 2 | # |
||
| 3 | # This file is part of SENAITE.CORE |
||
| 4 | # |
||
| 5 | # Copyright 2018 by it's authors. |
||
| 6 | # Some rights reserved. See LICENSE.rst, CONTRIBUTORS.rst. |
||
| 7 | |||
| 8 | # Mapping of indexes to be reindexed for each portal type after a given |
||
| 9 | # transition is performed. |
||
| 10 | # - If None is set for a given portal type and transition, doActionFor will |
||
| 11 | # only reindex "review_state" |
||
| 12 | # - If a given transition is not present or contains an empty list, doActionFor |
||
| 13 | # will reindex all indexes. |
||
| 14 | ACTIONS_TO_INDEXES = { |
||
| 15 | "Analysis": { |
||
| 16 | "assign": [ |
||
| 17 | "getAnalyst", |
||
| 18 | "getWorksheetUID", |
||
| 19 | ], |
||
| 20 | "cancel": [ |
||
| 21 | "cancellation_state", |
||
| 22 | ], |
||
| 23 | "reinstate": [ |
||
| 24 | "cancellation_state", |
||
| 25 | ], |
||
| 26 | "reject": [ |
||
| 27 | "getWorksheetUID", |
||
| 28 | ], |
||
| 29 | "retract": [ |
||
| 30 | "id", |
||
| 31 | "title", |
||
| 32 | ], |
||
| 33 | "submit": [ |
||
| 34 | "getAnalyst", |
||
| 35 | "getDueDate", |
||
| 36 | "getInstrumentUID", |
||
| 37 | "getMethodUID", |
||
| 38 | "getResultCaptureDate", |
||
| 39 | ], |
||
| 40 | "unassign": [ |
||
| 41 | "getAnalyst", |
||
| 42 | "getWorksheetUID", |
||
| 43 | ], |
||
| 44 | "verify": [ |
||
| 45 | "review_state", |
||
| 46 | ], |
||
| 47 | }, |
||
| 48 | |||
| 49 | "DuplicateAnalysis": { |
||
| 50 | "retract": [ |
||
| 51 | "id", |
||
| 52 | "title", |
||
| 53 | ], |
||
| 54 | "submit": [ |
||
| 55 | "getAnalyst", |
||
| 56 | "getDueDate", |
||
| 57 | "getInstrumentUID", |
||
| 58 | "getMethodUID", |
||
| 59 | "getResultCaptureDate", |
||
| 60 | ], |
||
| 61 | "unassign": None, |
||
| 62 | "verify": [ |
||
| 63 | "review_state", |
||
| 64 | ], |
||
| 65 | }, |
||
| 66 | |||
| 67 | "ReferenceAnalysis": { |
||
| 68 | "retract": [ |
||
| 69 | "review_state", |
||
| 70 | ], |
||
| 71 | "submit": [ |
||
| 72 | "getAnalyst", |
||
| 73 | "getDueDate", |
||
| 74 | "getInstrumentUID", |
||
| 75 | "getMethodUID", |
||
| 76 | "getResultCaptureDate", |
||
| 77 | "review_state", |
||
| 78 | ], |
||
| 79 | "unassign": None, |
||
| 80 | "verify": [ |
||
| 81 | "review_state", |
||
| 82 | ], |
||
| 83 | }, |
||
| 84 | |||
| 85 | "Worksheet": { |
||
| 86 | "attach": [ |
||
| 87 | "getAnalysesUIDs", |
||
| 88 | "getDepartmentUIDs", |
||
| 89 | ], |
||
| 90 | "rollback_to_open": [ |
||
| 91 | "getAnalysesUIDs", |
||
| 92 | "getDepartmentUIDs", |
||
| 93 | ], |
||
| 94 | "submit": [ |
||
| 95 | "getAnalysesUIDs", |
||
| 96 | "getDepartmentUIDs", |
||
| 97 | ], |
||
| 98 | "verify": [ |
||
| 99 | "getAnalysesUIDs", |
||
| 100 | "getDepartmentUIDs", |
||
| 101 | ], |
||
| 102 | }, |
||
| 103 | |||
| 104 | "AnalysisRequest": { |
||
| 105 | "rollback_to_receive": [ |
||
| 106 | "assigned_state", |
||
| 107 | "getDueDate", |
||
| 108 | ], |
||
| 109 | "submit": [ |
||
| 110 | "assigned_state", |
||
| 111 | "getDueDate", |
||
| 112 | ], |
||
| 113 | "verify": [ |
||
| 114 | "getDateVerified", |
||
| 115 | ] |
||
| 118 |