Fix slipped items

This commit is contained in:
Jan Kvetina 2022-03-06 22:40:32 +01:00
parent e47ba79b7a
commit e757f4ae73

View File

@ -1,7 +1,8 @@
CREATE OR REPLACE VIEW translations_slipped AS
WITH x AS (
SELECT /*+ MATERIALIZE */
app.get_app_id() AS app_id
app.get_app_id() AS app_id,
app.get_item('$PAGE_ID') AS page_id
FROM DUAL
),
t AS (
@ -10,9 +11,10 @@ t AS (
t.item_type,
LTRIM(RTRIM(REGEXP_REPLACE(t.value_en, '[!][A-Z]+\.$', '.'), '.'), '&') AS item_name,
t.page_id,
NULL AS value_en
t.value_en
FROM translations_extracts t
CROSS JOIN x
JOIN x
ON (x.page_id IN (0, t.page_id) OR x.page_id IS NULL)
LEFT JOIN translated_items i
ON i.app_id = x.app_id
AND i.page_id IN (0, t.page_id)
@ -33,7 +35,7 @@ LEFT JOIN apex_application_items a
AND a.item_name = t.item_name
LEFT JOIN apex_application_page_items p
ON p.application_id = t.app_id
AND p.page_id = t.page_id
AND p.page_id IN (0, 947, t.page_id)
AND p.item_name = t.item_name
WHERE a.item_name IS NULL
AND p.item_name IS NULL;