File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212 * or submit itself to any jurisdiction.
1313 */
1414
15+ /**
16+ * TEST or DEBUG production's name must have '_test' or '_debug' substring. '_' is required because of test periods like 'LHC22o-test'
17+ */
1518const NonPhysicsProductionsNamesWords = Object . freeze ( {
1619 TEST : 'test' ,
1720 DEBUG : 'debug' ,
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ const { dtoValidator } = require('../utilities/dtoValidator.js');
2121const { countedItemsToHttpView } = require ( '../utilities/countedItemsToHttpView.js' ) ;
2222const { updateExpressResponseFromNativeError } = require ( '../express/updateExpressResponseFromNativeError' ) ;
2323const PaginationDto = require ( '../../domain/dtos/PaginationDto.js' ) ;
24- const { NON_PHYSICS_PRODUCTIONS_NAMES_WORDS } = require ( '../../domain/enums/NonPhysicsProductionsNamesRoles .js' ) ;
24+ const { NON_PHYSICS_PRODUCTIONS_NAMES_WORDS } = require ( '../../domain/enums/NonPhysicsProductionsNamesWords .js' ) ;
2525
2626/**
2727 * List All DataPasses with statistics
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ const { PdpBeamType } = require('../../../domain/enums/PdpBeamType');
2222const { BadParameterError } = require ( '../../errors/BadParameterError' ) ;
2323const { SkimmingStage } = require ( '../../../domain/enums/SkimmingStage' ) ;
2424const { LogManager } = require ( '@aliceo2/web-ui' ) ;
25- const { NonPhysicsProductionsNamesWords } = require ( '../../../domain/enums/NonPhysicsProductionsNamesRoles .js' ) ;
25+ const { NonPhysicsProductionsNamesWords } = require ( '../../../domain/enums/NonPhysicsProductionsNamesWords .js' ) ;
2626
2727/**
2828 * @typedef DataPassIdentifier
@@ -136,10 +136,10 @@ class DataPassService {
136136
137137 const byName = filter ?. include ?. byName ?? [ ] ;
138138 if ( ! byName . includes ( NonPhysicsProductionsNamesWords . TEST ) ) {
139- queryBuilder . where ( 'name' ) . not ( ) . substring ( NonPhysicsProductionsNamesWords . TEST ) ;
139+ queryBuilder . where ( 'name' ) . not ( ) . substring ( `\\_ ${ NonPhysicsProductionsNamesWords . TEST } ` ) ;
140140 }
141141 if ( ! byName . includes ( NonPhysicsProductionsNamesWords . DEBUG ) ) {
142- queryBuilder . where ( 'name' ) . not ( ) . substring ( NonPhysicsProductionsNamesWords . DEBUG ) ;
142+ queryBuilder . where ( 'name' ) . not ( ) . substring ( `\\_ ${ NonPhysicsProductionsNamesWords . DEBUG } ` ) ;
143143 }
144144
145145 const { count, rows } = await DataPassRepository . findAndCountAll ( queryBuilder ) ;
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ const { RunQualities } = require('../../../domain/enums/RunQualities.js');
1919const { BadParameterError } = require ( '../../errors/BadParameterError' ) ;
2020const { NotFoundError } = require ( '../../errors/NotFoundError' ) ;
2121const { RunDefinition } = require ( '../../../domain/enums/RunDefinition.js' ) ;
22- const { NonPhysicsProductionsNamesWords } = require ( '../../../domain/enums/NonPhysicsProductionsNamesRoles .js' ) ;
22+ const { NonPhysicsProductionsNamesWords } = require ( '../../../domain/enums/NonPhysicsProductionsNamesWords .js' ) ;
2323
2424/**
2525 * @typedef LhcPeriodIdentifier object to uniquely identify a lhc period
@@ -204,8 +204,8 @@ class LhcPeriodStatisticsService {
204204
205205 where : {
206206 name : { [ Op . and ] : [
207- { [ Op . notLike ] : `%${ NonPhysicsProductionsNamesWords . TEST } %` } ,
208- { [ Op . notLike ] : `%${ NonPhysicsProductionsNamesWords . DEBUG } %` } ,
207+ { [ Op . notLike ] : `%\\_ ${ NonPhysicsProductionsNamesWords . TEST } %` } ,
208+ { [ Op . notLike ] : `%\\_ ${ NonPhysicsProductionsNamesWords . DEBUG } %` } ,
209209 ] } ,
210210 } ,
211211
You can’t perform that action at this time.
0 commit comments