diff --git a/frontend/common/types/requests.ts b/frontend/common/types/requests.ts index 03371963ce8d..242f0c8bfbfc 100644 --- a/frontend/common/types/requests.ts +++ b/frontend/common/types/requests.ts @@ -384,7 +384,8 @@ export type Req = { environment_id: string identity_id: string body: { - source_identity_id: string + source_identity_id?: string + source_identity_uuid?: string } } updateGroup: Req['createGroup'] & { diff --git a/frontend/web/components/CompareIdentities.tsx b/frontend/web/components/CompareIdentities.tsx index ffbc68a5e55a..a8d9f389d6e6 100644 --- a/frontend/web/components/CompareIdentities.tsx +++ b/frontend/web/components/CompareIdentities.tsx @@ -134,24 +134,31 @@ const CompareIdentities: FC = ({ rightIdentityId: string, environmentId: string, ) => { + const body = + Utils.getFeatureStatesEndpoint() === 'featurestates' + ? { source_identity_id: leftIdentityId } + : { source_identity_uuid: leftIdentityId } + return openConfirm({ body: (
- {'Cloning '} {leftIdentityName}{' '} - {'will copy any Identity Overrides in '} - {`${rightIdentityName}.`} {'Are you sure?'} + {'This will copy any Identity overrides from '}{' '} + {leftIdentityName} {'to '} + {`${rightIdentityName}.`}{' '} + {'Any existing Identity overrides on '} + {`${rightIdentityName}`} {'will be lost.'} +
+ {'The Multivariate values will not be cloned.'}
), destructive: true, onYes: () => { createCloneIdentityFeatureStates({ - body: { - source_identity_id: leftIdentityId, - }, + body: body, environment_id: environmentId, identity_id: rightIdentityId, }).then(() => { - toast('Clonation Completed!') + toast('Identity overrides successfully cloned!') }) }, title: 'Clone Identity',