mirror of
				https://gitlab.com/Chill-Projet/chill-bundles.git
				synced 2025-10-31 01:08:26 +00:00 
			
		
		
		
	Fix referrer scope date comparison in aggregator
Correct the date comparison logic to use openingDate instead of closingDate when evaluating user history end dates. This ensures accurate grouping by referrer in the accompanying course aggregators. Added a changelog entry for Issue #309.
This commit is contained in:
		
							
								
								
									
										6
									
								
								.changes/unreleased/Fixed-20240916-155150.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								.changes/unreleased/Fixed-20240916-155150.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,6 @@ | ||||
| kind: Fixed | ||||
| body: | | ||||
|   Correctly compute the grouping by referrer aggregator | ||||
| time: 2024-09-16T15:51:50.268336979+02:00 | ||||
| custom: | ||||
|   Issue: "309" | ||||
| @@ -56,7 +56,7 @@ readonly class ReferrerScopeAggregator implements AggregatorInterface, DataTrans | ||||
|                         $qb->expr()->gte('COALESCE(acp.closingDate, CURRENT_TIMESTAMP())', "{$p}_userHistory.startDate"), | ||||
|                         $qb->expr()->orX( | ||||
|                             $qb->expr()->isNull("{$p}_userHistory.endDate"), | ||||
|                             $qb->expr()->lt('COALESCE(acp.closingDate, CURRENT_TIMESTAMP())', "{$p}_userHistory.endDate") | ||||
|                             $qb->expr()->lt('COALESCE(acp.openingDate, CURRENT_TIMESTAMP())', "{$p}_userHistory.endDate") | ||||
|                         ) | ||||
|                     ), | ||||
|                     $qb->expr()->andX( | ||||
|   | ||||
		Reference in New Issue
	
	Block a user