Done
Details
Assignee
Bohdan SuprunBohdan Suprun(Deactivated)Reporter
Sobha DuvvuriSobha DuvvuriPriority
P2Story Points
2Sprint
NoneDevelopment Team
ProkopovychTestRail: Cases
Open TestRail: CasesTestRail: Runs
Open TestRail: Runs
Details
Details
Assignee
Bohdan Suprun
Bohdan Suprun(Deactivated)Reporter
Sobha Duvvuri
Sobha DuvvuriPriority
Story Points
2
Sprint
None
Development Team
Prokopovych
TestRail: Cases
Open TestRail: Cases
TestRail: Runs
Open TestRail: Runs
Created March 31, 2020 at 3:35 AM
Updated April 9, 2020 at 4:13 PM
Resolved April 2, 2020 at 3:25 PM
Upgraded this module from v18.2.3 to v19.1.1 on https://bugfest.folio.ebsco.com and noticed that the following function did not get migrated between Edelweiss and Fameflower:
CREATE OR REPLACE FUNCTION tenantId_mod_inventory_storage.update_item_status_date () RETURNS trigger AS $$ DECLARE newStatus text; BEGIN newStatus = NEW.jsonb->'status'->>'name'; IF (newStatus IS DISTINCT FROM OLD.jsonb->'status'->>'name') THEN NEW.jsonb = jsonb_set(NEW.jsonb, '{status,date}', to_jsonb(to_char(CURRENT_TIMESTAMP(3) AT TIME ZONE 'UTC', 'YYYY-MM-DD"T"HH24:MI:SS.ms"Z"')), true); ELSIF (OLD.jsonb->'status'->'date' IS NOT NULL) THEN NEW.jsonb = jsonb_set(NEW.jsonb, '{status,date}', OLD.jsonb->'status'->'date', true); ELSE NEW.jsonb = NEW.jsonb #- '{status, date}'; END IF; RETURN NEW; END; $$ LANGUAGE 'plpgsql' COST 100;