FIX query to get retention lines

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

Merge request reports