Merge: t-paliad-299 — HOTFIX: rename upc.apl → upc.apl.unified (unblock mig 134, restore paliad.de) (m/paliad#130)
This commit is contained in:
@@ -237,7 +237,7 @@ const translations: Record<Lang, Record<string, string>> = {
|
|||||||
"deadlines.upc.disc.cfi": "Bucheinsicht",
|
"deadlines.upc.disc.cfi": "Bucheinsicht",
|
||||||
"deadlines.upc.apl.cost": "Berufung Kosten",
|
"deadlines.upc.apl.cost": "Berufung Kosten",
|
||||||
"deadlines.upc.apl.order": "Berufung Anordnungen",
|
"deadlines.upc.apl.order": "Berufung Anordnungen",
|
||||||
"deadlines.upc.apl": "Berufung",
|
"deadlines.upc.apl.unified": "Berufung",
|
||||||
"deadlines.appeal_target.label": "Worauf richtet sich die Berufung?",
|
"deadlines.appeal_target.label": "Worauf richtet sich die Berufung?",
|
||||||
"deadlines.appeal_target.endentscheidung": "Endentscheidung",
|
"deadlines.appeal_target.endentscheidung": "Endentscheidung",
|
||||||
"deadlines.appeal_target.kostenentscheidung": "Kostenentscheidung",
|
"deadlines.appeal_target.kostenentscheidung": "Kostenentscheidung",
|
||||||
@@ -3334,7 +3334,7 @@ const translations: Record<Lang, Record<string, string>> = {
|
|||||||
"deadlines.upc.dmgs.cfi": "Damages Determination",
|
"deadlines.upc.dmgs.cfi": "Damages Determination",
|
||||||
"deadlines.upc.disc.cfi": "Lay-open Books",
|
"deadlines.upc.disc.cfi": "Lay-open Books",
|
||||||
"deadlines.upc.apl.cost": "Cost-Decision Appeal",
|
"deadlines.upc.apl.cost": "Cost-Decision Appeal",
|
||||||
"deadlines.upc.apl": "Appeal",
|
"deadlines.upc.apl.unified": "Appeal",
|
||||||
"deadlines.appeal_target.label": "Appeal against:",
|
"deadlines.appeal_target.label": "Appeal against:",
|
||||||
"deadlines.appeal_target.endentscheidung": "Final Decision",
|
"deadlines.appeal_target.endentscheidung": "Final Decision",
|
||||||
"deadlines.appeal_target.kostenentscheidung": "Cost Decision",
|
"deadlines.appeal_target.kostenentscheidung": "Cost Decision",
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ let sidePrefilledFromProject = false;
|
|||||||
// Conservative — false negatives just hide a control; false positives
|
// Conservative — false negatives just hide a control; false positives
|
||||||
// would show an irrelevant control.
|
// would show an irrelevant control.
|
||||||
const APPELLANT_AXIS_PROCEEDINGS = new Set([
|
const APPELLANT_AXIS_PROCEEDINGS = new Set([
|
||||||
"upc.apl",
|
"upc.apl.unified",
|
||||||
"de.inf.olg",
|
"de.inf.olg",
|
||||||
"de.inf.bgh",
|
"de.inf.bgh",
|
||||||
"de.null.bgh",
|
"de.null.bgh",
|
||||||
@@ -78,7 +78,7 @@ const APPELLANT_AXIS_PROCEEDINGS = new Set([
|
|||||||
// only the unified upc.apl proceeding; future variants (e.g. de.apl)
|
// only the unified upc.apl proceeding; future variants (e.g. de.apl)
|
||||||
// can opt in by adding the code here.
|
// can opt in by adding the code here.
|
||||||
const APPEAL_TARGET_PROCEEDINGS = new Set([
|
const APPEAL_TARGET_PROCEEDINGS = new Set([
|
||||||
"upc.apl",
|
"upc.apl.unified",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// Five canonical appeal-target slugs (lp.AppealTargets — keep ordered
|
// Five canonical appeal-target slugs (lp.AppealTargets — keep ordered
|
||||||
|
|||||||
@@ -1517,10 +1517,10 @@ export type I18nKey =
|
|||||||
| "deadlines.trigger.label"
|
| "deadlines.trigger.label"
|
||||||
| "deadlines.unavailable"
|
| "deadlines.unavailable"
|
||||||
| "deadlines.upc"
|
| "deadlines.upc"
|
||||||
| "deadlines.upc.apl"
|
|
||||||
| "deadlines.upc.apl.cost"
|
| "deadlines.upc.apl.cost"
|
||||||
| "deadlines.upc.apl.merits"
|
| "deadlines.upc.apl.merits"
|
||||||
| "deadlines.upc.apl.order"
|
| "deadlines.upc.apl.order"
|
||||||
|
| "deadlines.upc.apl.unified"
|
||||||
| "deadlines.upc.ccr.cfi"
|
| "deadlines.upc.ccr.cfi"
|
||||||
| "deadlines.upc.disc.cfi"
|
| "deadlines.upc.disc.cfi"
|
||||||
| "deadlines.upc.dmgs.cfi"
|
| "deadlines.upc.dmgs.cfi"
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ const UPC_TYPES: ProceedingDef[] = [
|
|||||||
{ code: "upc.rev.cfi", i18nKey: "deadlines.upc.rev.cfi", name: "Nichtigkeitsklage" },
|
{ code: "upc.rev.cfi", i18nKey: "deadlines.upc.rev.cfi", name: "Nichtigkeitsklage" },
|
||||||
{ code: "upc.ccr.cfi", i18nKey: "deadlines.upc.ccr.cfi", name: "Widerklage auf Nichtigkeit" },
|
{ code: "upc.ccr.cfi", i18nKey: "deadlines.upc.ccr.cfi", name: "Widerklage auf Nichtigkeit" },
|
||||||
{ code: "upc.pi.cfi", i18nKey: "deadlines.upc.pi.cfi", name: "Einstw. Maßnahmen" },
|
{ code: "upc.pi.cfi", i18nKey: "deadlines.upc.pi.cfi", name: "Einstw. Maßnahmen" },
|
||||||
{ code: "upc.apl", i18nKey: "deadlines.upc.apl", name: "Berufung" },
|
{ code: "upc.apl.unified", i18nKey: "deadlines.upc.apl.unified", name: "Berufung" },
|
||||||
{ code: "upc.dmgs.cfi", i18nKey: "deadlines.upc.dmgs.cfi", name: "Schadensbemessung" },
|
{ code: "upc.dmgs.cfi", i18nKey: "deadlines.upc.dmgs.cfi", name: "Schadensbemessung" },
|
||||||
{ code: "upc.disc.cfi", i18nKey: "deadlines.upc.disc.cfi", name: "Bucheinsicht" },
|
{ code: "upc.disc.cfi", i18nKey: "deadlines.upc.disc.cfi", name: "Bucheinsicht" },
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -41,10 +41,10 @@ UPDATE paliad.deadline_rules dr
|
|||||||
WHERE dr.applies_to_target = ARRAY['anordnung']::text[];
|
WHERE dr.applies_to_target = ARRAY['anordnung']::text[];
|
||||||
|
|
||||||
-- ---------------------------------------------------------------
|
-- ---------------------------------------------------------------
|
||||||
-- 3. Drop the unified upc.apl row (now orphaned).
|
-- 3. Drop the unified upc.apl.unified row (now orphaned).
|
||||||
-- ---------------------------------------------------------------
|
-- ---------------------------------------------------------------
|
||||||
|
|
||||||
DELETE FROM paliad.proceeding_types WHERE code = 'upc.apl';
|
DELETE FROM paliad.proceeding_types WHERE code = 'upc.apl.unified';
|
||||||
|
|
||||||
-- ---------------------------------------------------------------
|
-- ---------------------------------------------------------------
|
||||||
-- 4. Drop the new columns + their CHECK constraints.
|
-- 4. Drop the new columns + their CHECK constraints.
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ INSERT INTO paliad.proceeding_types (
|
|||||||
appeal_target
|
appeal_target
|
||||||
)
|
)
|
||||||
SELECT
|
SELECT
|
||||||
'upc.apl',
|
'upc.apl.unified',
|
||||||
'Berufungsverfahren',
|
'Berufungsverfahren',
|
||||||
'Appeal',
|
'Appeal',
|
||||||
'Vereinheitlichtes Berufungsverfahren — wählen Sie anschließend, '
|
'Vereinheitlichtes Berufungsverfahren — wählen Sie anschließend, '
|
||||||
@@ -120,10 +120,10 @@ DECLARE
|
|||||||
BEGIN
|
BEGIN
|
||||||
SELECT id INTO upc_apl_id
|
SELECT id INTO upc_apl_id
|
||||||
FROM paliad.proceeding_types
|
FROM paliad.proceeding_types
|
||||||
WHERE code = 'upc.apl';
|
WHERE code = 'upc.apl.unified';
|
||||||
RAISE NOTICE '[mig 134] new upc.apl proceeding_type_id = %', upc_apl_id;
|
RAISE NOTICE '[mig 134] new upc.apl.unified proceeding_type_id = %', upc_apl_id;
|
||||||
|
|
||||||
RAISE NOTICE '[mig 134] Rules to reassign to upc.apl with applies_to_target:';
|
RAISE NOTICE '[mig 134] Rules to reassign to upc.apl.unified with applies_to_target:';
|
||||||
FOR rec IN
|
FOR rec IN
|
||||||
SELECT dr.id AS rule_id,
|
SELECT dr.id AS rule_id,
|
||||||
pt.code AS old_proceeding,
|
pt.code AS old_proceeding,
|
||||||
@@ -185,10 +185,10 @@ UPDATE paliad.deadline_rules dr
|
|||||||
AND pt.code = 'upc.apl.order'
|
AND pt.code = 'upc.apl.order'
|
||||||
AND dr.is_active = true;
|
AND dr.is_active = true;
|
||||||
|
|
||||||
-- 4d. Reassign all 16 rules to the new upc.apl proceeding_type row.
|
-- 4d. Reassign all 16 rules to the new upc.apl.unified proceeding_type row.
|
||||||
UPDATE paliad.deadline_rules dr
|
UPDATE paliad.deadline_rules dr
|
||||||
SET proceeding_type_id = (
|
SET proceeding_type_id = (
|
||||||
SELECT id FROM paliad.proceeding_types WHERE code = 'upc.apl'
|
SELECT id FROM paliad.proceeding_types WHERE code = 'upc.apl.unified'
|
||||||
)
|
)
|
||||||
FROM paliad.proceeding_types pt
|
FROM paliad.proceeding_types pt
|
||||||
WHERE pt.id = dr.proceeding_type_id
|
WHERE pt.id = dr.proceeding_type_id
|
||||||
@@ -221,10 +221,10 @@ BEGIN
|
|||||||
SELECT COUNT(*) INTO unified_count
|
SELECT COUNT(*) INTO unified_count
|
||||||
FROM paliad.deadline_rules dr
|
FROM paliad.deadline_rules dr
|
||||||
JOIN paliad.proceeding_types pt ON pt.id = dr.proceeding_type_id
|
JOIN paliad.proceeding_types pt ON pt.id = dr.proceeding_type_id
|
||||||
WHERE pt.code = 'upc.apl' AND dr.is_active = true;
|
WHERE pt.code = 'upc.apl.unified' AND dr.is_active = true;
|
||||||
RAISE NOTICE '[mig 134] post: rules on unified upc.apl = % (expected 16)', unified_count;
|
RAISE NOTICE '[mig 134] post: rules on unified upc.apl.unified = % (expected 16)', unified_count;
|
||||||
IF unified_count <> 16 THEN
|
IF unified_count <> 16 THEN
|
||||||
RAISE EXCEPTION '[mig 134] FAILED — expected 16 rules on upc.apl, got %', unified_count;
|
RAISE EXCEPTION '[mig 134] FAILED — expected 16 rules on upc.apl.unified, got %', unified_count;
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
SELECT COUNT(*) INTO archived_count
|
SELECT COUNT(*) INTO archived_count
|
||||||
@@ -240,7 +240,7 @@ BEGIN
|
|||||||
SELECT unnest(applies_to_target) AS target, COUNT(*) AS n
|
SELECT unnest(applies_to_target) AS target, COUNT(*) AS n
|
||||||
FROM paliad.deadline_rules dr
|
FROM paliad.deadline_rules dr
|
||||||
JOIN paliad.proceeding_types pt ON pt.id = dr.proceeding_type_id
|
JOIN paliad.proceeding_types pt ON pt.id = dr.proceeding_type_id
|
||||||
WHERE pt.code = 'upc.apl' AND dr.is_active = true
|
WHERE pt.code = 'upc.apl.unified' AND dr.is_active = true
|
||||||
GROUP BY unnest(applies_to_target)
|
GROUP BY unnest(applies_to_target)
|
||||||
ORDER BY 1
|
ORDER BY 1
|
||||||
LOOP
|
LOOP
|
||||||
|
|||||||
@@ -137,8 +137,8 @@ func TestLookupEvents(t *testing.T) {
|
|||||||
t.Errorf("anchor row %s missing endentscheidung target: %v",
|
t.Errorf("anchor row %s missing endentscheidung target: %v",
|
||||||
m.Rule.Name, m.Rule.AppliesToTarget)
|
m.Rule.Name, m.Rule.AppliesToTarget)
|
||||||
}
|
}
|
||||||
if m.ProceedingType.Code != "upc.apl" {
|
if m.ProceedingType.Code != "upc.apl.unified" {
|
||||||
t.Errorf("anchor row %s came from %s, want upc.apl",
|
t.Errorf("anchor row %s came from %s, want upc.apl.unified",
|
||||||
m.Rule.Name, m.ProceedingType.Code)
|
m.Rule.Name, m.ProceedingType.Code)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user