fix: Copy evaluation version for cloned application from the source application to fix dynamic binding evaluation to support escaped characters without double escapes (#10702)
This commit is contained in:
parent
45d3704dda
commit
07082f6bde
|
|
@ -687,6 +687,7 @@ public class ApplicationPageServiceCEImpl implements ApplicationPageServiceCE {
|
|||
Application newApplication = new Application(sourceApplication);
|
||||
newApplication.setName(newName);
|
||||
newApplication.setLastEditedAt(Instant.now());
|
||||
newApplication.setEvaluationVersion(sourceApplication.getEvaluationVersion());
|
||||
Mono<User> userMono = sessionUserService.getCurrentUser().cache();
|
||||
// First set the correct policies for the new cloned application
|
||||
return setApplicationPolicies(userMono, sourceApplication.getOrganizationId(), newApplication)
|
||||
|
|
|
|||
|
|
@ -990,6 +990,9 @@ public class ApplicationServiceTest {
|
|||
assertThat(clonedApplication.getOrganizationId().equals(orgId));
|
||||
assertThat(clonedApplication.getModifiedBy()).isEqualTo("api_user");
|
||||
assertThat(clonedApplication.getUpdatedAt()).isNotNull();
|
||||
assertThat(clonedApplication.getEvaluationVersion()).isNotNull();
|
||||
assertThat(clonedApplication.getEvaluationVersion()).isEqualTo(gitConnectedApp.getEvaluationVersion());
|
||||
|
||||
List<ApplicationPage> pages = clonedApplication.getPages();
|
||||
Set<String> clonedPageIdsFromApplication = pages.stream().map(page -> page.getId()).collect(Collectors.toSet());
|
||||
Set<String> clonedPageIdsFromDb = clonedPageList.stream().map(page -> page.getId()).collect(Collectors.toSet());
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user