FIX query to get retention lines

Merged Macarena Meldi requested to merge 15.0-hf-T1452 into 15.0-preStable

Merge request reports