@@ -150,55 +150,55 @@ public static async Task DeployEform(PropertyWorker propertyWorker, int eformId
150150 && x . CaseStatusesEnum == CaseStatusesEnum . NewTask
151151 && x . WorkflowState != Constants . WorkflowStates . Removed ) )
152152 {
153- // find all cases that are not removed and assignedTo is equal to site.name and update them with the new name
154- var workorderCases = await backendConfigurationPnDbContext . WorkorderCases
155- . Where ( x => x . AssignedToSdkSiteId == propertyWorker . WorkerId )
156- . Where ( x => x . CaseStatusesEnum != CaseStatusesEnum . NewTask )
157- . Where ( x => x . CaseStatusesEnum != CaseStatusesEnum . Completed )
158- . Where ( x => x . LeadingCase == true )
159- . Where ( x => x . WorkflowState != Constants . WorkflowStates . Removed )
160- . ToListAsync ( ) . ConfigureAwait ( false ) ;
161- foreach ( var workorderCase in workorderCases )
162- {
163- await BackendConfigurationTaskManagementHelper . UpdateTask ( new WorkOrderCaseUpdateModel ( ) { Id = workorderCase . Id , AssignedSiteId = ( int ) workorderCase . AssignedToSdkSiteId ! , Description = workorderCase . Description , Priority = int . Parse ( workorderCase . Priority ) } ,
164- localizationService , core , userService , backendConfigurationPnDbContext , bus , useGetCurrentUserFullName ) . ConfigureAwait ( false ) ;
165- }
166-
167- workorderCases = await backendConfigurationPnDbContext . WorkorderCases
168- . Where ( x => x . CreatedBySdkSiteId == propertyWorker . WorkerId )
169- . Where ( x => x . CaseStatusesEnum != CaseStatusesEnum . NewTask )
170- . Where ( x => x . CaseStatusesEnum != CaseStatusesEnum . Completed )
171- . Where ( x => x . LeadingCase == true )
172- . Where ( x => x . WorkflowState != Constants . WorkflowStates . Removed )
173- . ToListAsync ( ) . ConfigureAwait ( false ) ;
174- foreach ( var workorderCase in workorderCases )
175- {
176- if ( workorderCase . AssignedToSdkSiteId == null )
177- {
178- continue ;
179- }
180-
181- await BackendConfigurationTaskManagementHelper . UpdateTask ( new WorkOrderCaseUpdateModel ( ) { Id = workorderCase . Id , AssignedSiteId = ( int ) workorderCase . AssignedToSdkSiteId ! , Description = workorderCase . Description , Priority = int . Parse ( workorderCase . Priority ) } ,
182- localizationService , core , userService , backendConfigurationPnDbContext , bus , useGetCurrentUserFullName ) . ConfigureAwait ( false ) ;
183- }
184-
185- workorderCases = await backendConfigurationPnDbContext . WorkorderCases
186- . Where ( x => x . UpdatedBySdkSiteId == propertyWorker . WorkerId )
187- . Where ( x => x . CaseStatusesEnum != CaseStatusesEnum . NewTask )
188- . Where ( x => x . CaseStatusesEnum != CaseStatusesEnum . Completed )
189- . Where ( x => x . LeadingCase == true )
190- . Where ( x => x . WorkflowState != Constants . WorkflowStates . Removed )
191- . ToListAsync ( ) . ConfigureAwait ( false ) ;
192- foreach ( var workorderCase in workorderCases )
193- {
194- if ( workorderCase . AssignedToSdkSiteId == null )
195- {
196- continue ;
197- }
198-
199- await BackendConfigurationTaskManagementHelper . UpdateTask ( new WorkOrderCaseUpdateModel ( ) { Id = workorderCase . Id , AssignedSiteId = ( int ) workorderCase . AssignedToSdkSiteId ! , Description = workorderCase . Description , Priority = int . Parse ( workorderCase . Priority ) } ,
200- localizationService , core , userService , backendConfigurationPnDbContext , bus , useGetCurrentUserFullName ) . ConfigureAwait ( false ) ;
201- }
153+ // // find all cases that are not removed and assignedTo is equal to site.name and update them with the new name
154+ // var workorderCases = await backendConfigurationPnDbContext.WorkorderCases
155+ // .Where(x => x.AssignedToSdkSiteId == propertyWorker.WorkerId)
156+ // .Where(x => x.CaseStatusesEnum != CaseStatusesEnum.NewTask)
157+ // .Where(x => x.CaseStatusesEnum != CaseStatusesEnum.Completed)
158+ // .Where(x => x.LeadingCase == true)
159+ // .Where(x => x.WorkflowState != Constants.WorkflowStates.Removed)
160+ // .ToListAsync().ConfigureAwait(false);
161+ // foreach (var workorderCase in workorderCases)
162+ // {
163+ // await BackendConfigurationTaskManagementHelper.UpdateTask(new WorkOrderCaseUpdateModel() {Id = workorderCase.Id, AssignedSiteId = (int) workorderCase.AssignedToSdkSiteId!, Description = workorderCase.Description, Priority = int.Parse(workorderCase.Priority)},
164+ // localizationService, core, userService, backendConfigurationPnDbContext, bus, useGetCurrentUserFullName).ConfigureAwait(false);
165+ // }
166+ //
167+ // workorderCases = await backendConfigurationPnDbContext.WorkorderCases
168+ // .Where(x => x.CreatedBySdkSiteId == propertyWorker.WorkerId)
169+ // .Where(x => x.CaseStatusesEnum != CaseStatusesEnum.NewTask)
170+ // .Where(x => x.CaseStatusesEnum != CaseStatusesEnum.Completed)
171+ // .Where(x => x.LeadingCase == true)
172+ // .Where(x => x.WorkflowState != Constants.WorkflowStates.Removed)
173+ // .ToListAsync().ConfigureAwait(false);
174+ // foreach (var workorderCase in workorderCases)
175+ // {
176+ // if(workorderCase.AssignedToSdkSiteId == null)
177+ // {
178+ // continue;
179+ // }
180+ //
181+ // await BackendConfigurationTaskManagementHelper.UpdateTask(new WorkOrderCaseUpdateModel() {Id = workorderCase.Id, AssignedSiteId = (int) workorderCase.AssignedToSdkSiteId!, Description = workorderCase.Description, Priority = int.Parse(workorderCase.Priority)},
182+ // localizationService, core, userService, backendConfigurationPnDbContext, bus, useGetCurrentUserFullName).ConfigureAwait(false);
183+ // }
184+ //
185+ // workorderCases = await backendConfigurationPnDbContext.WorkorderCases
186+ // .Where(x => x.UpdatedBySdkSiteId == propertyWorker.WorkerId)
187+ // .Where(x => x.CaseStatusesEnum != CaseStatusesEnum.NewTask)
188+ // .Where(x => x.CaseStatusesEnum != CaseStatusesEnum.Completed)
189+ // .Where(x => x.LeadingCase == true)
190+ // .Where(x => x.WorkflowState != Constants.WorkflowStates.Removed)
191+ // .ToListAsync().ConfigureAwait(false);
192+ // foreach (var workorderCase in workorderCases)
193+ // {
194+ // if(workorderCase.AssignedToSdkSiteId == null)
195+ // {
196+ // continue;
197+ // }
198+ //
199+ // await BackendConfigurationTaskManagementHelper.UpdateTask(new WorkOrderCaseUpdateModel() {Id = workorderCase.Id, AssignedSiteId = (int) workorderCase.AssignedToSdkSiteId!, Description = workorderCase.Description, Priority = int.Parse(workorderCase.Priority)},
200+ // localizationService, core, userService, backendConfigurationPnDbContext, bus, useGetCurrentUserFullName).ConfigureAwait(false);
201+ // }
202202
203203
204204 return ;
0 commit comments