Skip to content
Snippets Groups Projects
Commit 06aeadbb authored by Jorrit Schaap's avatar Jorrit Schaap
Browse files

SW-801: fixed sql code to resolve bug SW-801. resource_usages arn't lost...

SW-801: fixed sql code to resolve bug SW-801. resource_usages arn't lost anymore when updating the start/endtimes with the same start/endtimes
parent ed2ccf10
No related branches found
No related tags found
2 merge requests!40Merge Lofar release 4 0 into master,!35SW-801: Resolve SW-801
...@@ -729,11 +729,7 @@ BEGIN ...@@ -729,11 +729,7 @@ BEGIN
PERFORM resource_allocation.process_old_claim_outof_resource_usages(OLD); PERFORM resource_allocation.process_old_claim_outof_resource_usages(OLD);
END IF; END IF;
--only check claim if status and/or claim_size and/or start/end time changed IF TG_OP = 'INSERT' OR TG_OP = 'UPDATE' THEN
IF TG_OP = 'INSERT' OR (TG_OP = 'UPDATE' AND (OLD.status_id <> NEW.status_id OR
OLD.claim_size <> NEW.claim_size OR
OLD.starttime <> NEW.starttime OR
OLD.endtime <> NEW.endtime)) THEN
--check if claim fits or has conflicts --check if claim fits or has conflicts
SELECT * FROM resource_allocation.has_conflict_with_overlapping_claims(NEW) INTO claim_has_conflicts; SELECT * FROM resource_allocation.has_conflict_with_overlapping_claims(NEW) INTO claim_has_conflicts;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment