diff --git a/apps/browser/src/vault/popup/components/vault-v2/add-edit/add-edit-v2.component.spec.ts b/apps/browser/src/vault/popup/components/vault-v2/add-edit/add-edit-v2.component.spec.ts index 77a50ea35d..ebfb1ff765 100644 --- a/apps/browser/src/vault/popup/components/vault-v2/add-edit/add-edit-v2.component.spec.ts +++ b/apps/browser/src/vault/popup/components/vault-v2/add-edit/add-edit-v2.component.spec.ts @@ -3,6 +3,8 @@ import { ActivatedRoute, Router } from "@angular/router"; import { mock, MockProxy } from "jest-mock-extended"; import { BehaviorSubject } from "rxjs"; +import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service"; +import { EventType } from "@bitwarden/common/enums"; import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; @@ -44,12 +46,14 @@ describe("AddEditV2Component", () => { const disable = jest.fn(); const navigate = jest.fn(); const back = jest.fn().mockResolvedValue(null); + const collect = jest.fn().mockResolvedValue(null); beforeEach(async () => { buildConfig.mockClear(); disable.mockClear(); navigate.mockClear(); back.mockClear(); + collect.mockClear(); addEditCipherInfo$ = new BehaviorSubject(null); cipherServiceMock = mock(); @@ -66,6 +70,7 @@ describe("AddEditV2Component", () => { { provide: ActivatedRoute, useValue: { queryParams: queryParams$ } }, { provide: I18nService, useValue: { t: (key: string) => key } }, { provide: CipherService, useValue: cipherServiceMock }, + { provide: EventCollectionService, useValue: { collect } }, ], }) .overrideProvider(CipherFormConfigService, { @@ -122,6 +127,57 @@ describe("AddEditV2Component", () => { }); }); + describe("analytics", () => { + it("does not log viewed event when mode is add", fakeAsync(() => { + queryParams$.next({}); + + tick(); + + expect(collect).not.toHaveBeenCalled(); + })); + + it("does not log viewed event whe mode is clone", fakeAsync(() => { + queryParams$.next({ cipherId: "222-333-444-5555", clone: "true" }); + buildConfigResponse.originalCipher = {} as Cipher; + + tick(); + + expect(collect).not.toHaveBeenCalled(); + })); + + it("logs viewed event when mode is edit", fakeAsync(() => { + buildConfigResponse.originalCipher = { + edit: true, + id: "222-333-444-5555", + organizationId: "444-555-666", + } as Cipher; + queryParams$.next({ cipherId: "222-333-444-5555" }); + + tick(); + + expect(collect).toHaveBeenCalledWith( + EventType.Cipher_ClientViewed, + "222-333-444-5555", + false, + "444-555-666", + ); + })); + + it("logs viewed event whe mode is partial-edit", fakeAsync(() => { + buildConfigResponse.originalCipher = { edit: false } as Cipher; + queryParams$.next({ cipherId: "222-333-444-5555", orgId: "444-555-666" }); + + tick(); + + expect(collect).toHaveBeenCalledWith( + EventType.Cipher_ClientViewed, + "222-333-444-5555", + false, + "444-555-666", + ); + })); + }); + describe("addEditCipherInfo initialization", () => { it("populates config.initialValues with `addEditCipherInfo` values", fakeAsync(() => { const addEditCipherInfo = { diff --git a/apps/browser/src/vault/popup/components/vault-v2/add-edit/add-edit-v2.component.ts b/apps/browser/src/vault/popup/components/vault-v2/add-edit/add-edit-v2.component.ts index 7664c7e0ca..5febed788e 100644 --- a/apps/browser/src/vault/popup/components/vault-v2/add-edit/add-edit-v2.component.ts +++ b/apps/browser/src/vault/popup/components/vault-v2/add-edit/add-edit-v2.component.ts @@ -6,6 +6,8 @@ import { ActivatedRoute, Params, Router } from "@angular/router"; import { firstValueFrom, map, switchMap } from "rxjs"; import { JslibModule } from "@bitwarden/angular/jslib.module"; +import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service"; +import { EventType } from "@bitwarden/common/enums"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { CipherId, CollectionId, OrganizationId } from "@bitwarden/common/types/guid"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; @@ -160,6 +162,7 @@ export class AddEditV2Component implements OnInit { private popupRouterCacheService: PopupRouterCacheService, private router: Router, private cipherService: CipherService, + private eventCollectionService: EventCollectionService, ) { this.subscribeToParams(); } @@ -275,6 +278,15 @@ export class AddEditV2Component implements OnInit { await this.cipherService.setAddEditCipherInfo(null); } + if (["edit", "partial-edit"].includes(config.mode) && config.originalCipher?.id) { + await this.eventCollectionService.collect( + EventType.Cipher_ClientViewed, + config.originalCipher.id, + false, + config.originalCipher.organizationId, + ); + } + return config; }), ) diff --git a/apps/browser/src/vault/popup/components/vault-v2/view-v2/view-v2.component.spec.ts b/apps/browser/src/vault/popup/components/vault-v2/view-v2/view-v2.component.spec.ts index 9851b16aa4..69ee2dafe5 100644 --- a/apps/browser/src/vault/popup/components/vault-v2/view-v2/view-v2.component.spec.ts +++ b/apps/browser/src/vault/popup/components/vault-v2/view-v2/view-v2.component.spec.ts @@ -3,7 +3,9 @@ import { ActivatedRoute, Router } from "@angular/router"; import { mock } from "jest-mock-extended"; import { Subject } from "rxjs"; +import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service"; import { AccountService } from "@bitwarden/common/auth/abstractions/account.service"; +import { EventType } from "@bitwarden/common/enums"; import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; @@ -29,10 +31,12 @@ describe("ViewV2Component", () => { let fixture: ComponentFixture; const params$ = new Subject(); const mockNavigate = jest.fn(); + const collect = jest.fn().mockResolvedValue(null); const mockCipher = { id: "122-333-444", type: CipherType.Login, + orgId: "222-444-555", }; const mockVaultPopupAutofillService = { @@ -48,6 +52,7 @@ describe("ViewV2Component", () => { beforeEach(async () => { mockNavigate.mockClear(); + collect.mockClear(); await TestBed.configureTestingModule({ imports: [ViewV2Component], @@ -59,6 +64,7 @@ describe("ViewV2Component", () => { { provide: ConfigService, useValue: mock() }, { provide: PopupRouterCacheService, useValue: mock() }, { provide: ActivatedRoute, useValue: { queryParams: params$ } }, + { provide: EventCollectionService, useValue: { collect } }, { provide: I18nService, useValue: { @@ -122,5 +128,18 @@ describe("ViewV2Component", () => { expect(component.headerText).toEqual("viewItemHeader note"); })); + + it("sends viewed event", fakeAsync(() => { + params$.next({ cipherId: "122-333-444" }); + + flush(); // Resolve all promises + + expect(collect).toHaveBeenCalledWith( + EventType.Cipher_ClientViewed, + mockCipher.id, + false, + undefined, + ); + })); }); }); diff --git a/apps/browser/src/vault/popup/components/vault-v2/view-v2/view-v2.component.ts b/apps/browser/src/vault/popup/components/vault-v2/view-v2/view-v2.component.ts index 4025beb685..e8aab69dbe 100644 --- a/apps/browser/src/vault/popup/components/vault-v2/view-v2/view-v2.component.ts +++ b/apps/browser/src/vault/popup/components/vault-v2/view-v2/view-v2.component.ts @@ -6,9 +6,11 @@ import { ActivatedRoute, Router } from "@angular/router"; import { firstValueFrom, map, Observable, switchMap } from "rxjs"; import { JslibModule } from "@bitwarden/angular/jslib.module"; +import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; import { AccountService } from "@bitwarden/common/auth/abstractions/account.service"; import { AUTOFILL_ID, SHOW_AUTOFILL_BUTTON } from "@bitwarden/common/autofill/constants"; +import { EventType } from "@bitwarden/common/enums"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; @@ -73,6 +75,7 @@ export class ViewV2Component { private toastService: ToastService, private vaultPopupAutofillService: VaultPopupAutofillService, private accountService: AccountService, + private eventCollectionService: EventCollectionService, ) { this.subscribeToParams(); } @@ -90,6 +93,13 @@ export class ViewV2Component { if (this.loadAction === AUTOFILL_ID || this.loadAction === SHOW_AUTOFILL_BUTTON) { await this.vaultPopupAutofillService.doAutofill(this.cipher); } + + await this.eventCollectionService.collect( + EventType.Cipher_ClientViewed, + cipher.id, + false, + cipher.organizationId, + ); }), takeUntilDestroyed(), ) diff --git a/libs/vault/src/cipher-form/components/card-details-section/card-details-section.component.html b/libs/vault/src/cipher-form/components/card-details-section/card-details-section.component.html index 161f193108..44d8a21d3c 100644 --- a/libs/vault/src/cipher-form/components/card-details-section/card-details-section.component.html +++ b/libs/vault/src/cipher-form/components/card-details-section/card-details-section.component.html @@ -19,6 +19,7 @@ bitSuffix bitPasswordInputToggle data-testid="visibility-for-card-number" + (toggledChange)="logCardEvent($event, EventType.Cipher_ClientToggledCardNumberVisible)" > @@ -60,6 +61,7 @@ bitSuffix bitPasswordInputToggle data-testid="visibility-for-card-code" + (toggledChange)="logCardEvent($event, EventType.Cipher_ClientToggledCardCodeVisible)" > diff --git a/libs/vault/src/cipher-form/components/card-details-section/card-details-section.component.spec.ts b/libs/vault/src/cipher-form/components/card-details-section/card-details-section.component.spec.ts index 196be144fd..e9581859b2 100644 --- a/libs/vault/src/cipher-form/components/card-details-section/card-details-section.component.spec.ts +++ b/libs/vault/src/cipher-form/components/card-details-section/card-details-section.component.spec.ts @@ -4,6 +4,7 @@ import { ReactiveFormsModule } from "@angular/forms"; import { By } from "@angular/platform-browser"; import { mock, MockProxy } from "jest-mock-extended"; +import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { CardView } from "@bitwarden/common/vault/models/view/card.view"; import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; @@ -27,6 +28,7 @@ describe("CardDetailsSectionComponent", () => { await TestBed.configureTestingModule({ imports: [CardDetailsSectionComponent, CommonModule, ReactiveFormsModule], providers: [ + { provide: EventCollectionService, useValue: mock() }, { provide: CipherFormContainer, useValue: cipherFormProvider }, { provide: I18nService, useValue: { t: (key: string) => key } }, ], diff --git a/libs/vault/src/cipher-form/components/card-details-section/card-details-section.component.ts b/libs/vault/src/cipher-form/components/card-details-section/card-details-section.component.ts index df45bcbcac..e1ef3dc0f3 100644 --- a/libs/vault/src/cipher-form/components/card-details-section/card-details-section.component.ts +++ b/libs/vault/src/cipher-form/components/card-details-section/card-details-section.component.ts @@ -4,6 +4,8 @@ import { takeUntilDestroyed } from "@angular/core/rxjs-interop"; import { FormBuilder, ReactiveFormsModule } from "@angular/forms"; import { JslibModule } from "@bitwarden/angular/jslib.module"; +import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service"; +import { EventType } from "@bitwarden/common/enums"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { CardView } from "@bitwarden/common/vault/models/view/card.view"; import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; @@ -91,10 +93,13 @@ export class CardDetailsSectionComponent implements OnInit { { name: "12 - " + this.i18nService.t("december"), value: "12" }, ]; + EventType = EventType; + constructor( private cipherFormContainer: CipherFormContainer, private formBuilder: FormBuilder, private i18nService: I18nService, + private eventCollectionService: EventCollectionService, ) { this.cipherFormContainer.registerChildForm("cardDetails", this.cardDetailsForm); @@ -149,6 +154,21 @@ export class CardDetailsSectionComponent implements OnInit { return this.i18nService.t("cardDetails"); } + async logCardEvent(hiddenFieldVisible: boolean, event: EventType) { + const { mode, originalCipher } = this.cipherFormContainer.config; + + const isEdit = ["edit", "partial-edit"].includes(mode); + + if (hiddenFieldVisible && isEdit) { + await this.eventCollectionService.collect( + event, + originalCipher.id, + false, + originalCipher.organizationId, + ); + } + } + /** Set form initial form values from the current cipher */ private setInitialValues() { const { cardholderName, number, brand, expMonth, expYear, code } = this.originalCipherView.card; diff --git a/libs/vault/src/cipher-form/components/custom-fields/custom-fields.component.html b/libs/vault/src/cipher-form/components/custom-fields/custom-fields.component.html index 1be4d922c5..0ab059b09c 100644 --- a/libs/vault/src/cipher-form/components/custom-fields/custom-fields.component.html +++ b/libs/vault/src/cipher-form/components/custom-fields/custom-fields.component.html @@ -46,6 +46,7 @@ bitPasswordInputToggle data-testid="visibility-for-custom-hidden-field" [disabled]="!canViewPasswords(i)" + (toggledChange)="logHiddenEvent($event)" > diff --git a/libs/vault/src/cipher-form/components/custom-fields/custom-fields.component.spec.ts b/libs/vault/src/cipher-form/components/custom-fields/custom-fields.component.spec.ts index 036a59672e..0c0fa1b418 100644 --- a/libs/vault/src/cipher-form/components/custom-fields/custom-fields.component.spec.ts +++ b/libs/vault/src/cipher-form/components/custom-fields/custom-fields.component.spec.ts @@ -4,7 +4,9 @@ import { CdkDragDrop } from "@angular/cdk/drag-drop"; import { DebugElement } from "@angular/core"; import { ComponentFixture, TestBed } from "@angular/core/testing"; import { By } from "@angular/platform-browser"; +import { mock } from "jest-mock-extended"; +import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { CardLinkedId, @@ -50,6 +52,7 @@ describe("CustomFieldsComponent", () => { await TestBed.configureTestingModule({ imports: [CustomFieldsComponent], providers: [ + { provide: EventCollectionService, useValue: mock() }, { provide: I18nService, useValue: { t: (...keys: string[]) => keys.filter(Boolean).join(" ") }, diff --git a/libs/vault/src/cipher-form/components/custom-fields/custom-fields.component.ts b/libs/vault/src/cipher-form/components/custom-fields/custom-fields.component.ts index e2aa118b88..1aeb9e0da0 100644 --- a/libs/vault/src/cipher-form/components/custom-fields/custom-fields.component.ts +++ b/libs/vault/src/cipher-form/components/custom-fields/custom-fields.component.ts @@ -19,6 +19,8 @@ import { FormArray, FormBuilder, FormsModule, ReactiveFormsModule } from "@angul import { Subject, zip } from "rxjs"; import { JslibModule } from "@bitwarden/angular/jslib.module"; +import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service"; +import { EventType } from "@bitwarden/common/enums"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { CipherType, FieldType, LinkedIdType } from "@bitwarden/common/vault/enums"; import { CardView } from "@bitwarden/common/vault/models/view/card.view"; @@ -118,6 +120,7 @@ export class CustomFieldsComponent implements OnInit, AfterViewInit { private formBuilder: FormBuilder, private i18nService: I18nService, private liveAnnouncer: LiveAnnouncer, + private eventCollectionService: EventCollectionService, ) { this.destroyed$ = inject(DestroyRef); this.cipherFormContainer.registerChildForm("customFields", this.customFieldsForm); @@ -301,6 +304,21 @@ export class CustomFieldsComponent implements OnInit, AfterViewInit { } } + async logHiddenEvent(hiddenFieldVisible: boolean) { + const { mode, originalCipher } = this.cipherFormContainer.config; + + const isEdit = ["edit", "partial-edit"].includes(mode); + + if (hiddenFieldVisible && isEdit) { + await this.eventCollectionService.collect( + EventType.Cipher_ClientToggledHiddenFieldVisible, + originalCipher.id, + false, + originalCipher.organizationId, + ); + } + } + /** * Returns the linked field options for the current cipher type * diff --git a/libs/vault/src/cipher-form/components/login-details-section/login-details-section.component.html b/libs/vault/src/cipher-form/components/login-details-section/login-details-section.component.html index af75eae862..b91258a218 100644 --- a/libs/vault/src/cipher-form/components/login-details-section/login-details-section.component.html +++ b/libs/vault/src/cipher-form/components/login-details-section/login-details-section.component.html @@ -57,6 +57,7 @@ *ngIf="viewHiddenFields" data-testid="toggle-password-visibility" bitPasswordInputToggle + (toggledChange)="logVisibleEvent($event, EventType.Cipher_ClientToggledPasswordVisible)" > diff --git a/libs/vault/src/cipher-view/card-details/card-details-view.component.ts b/libs/vault/src/cipher-view/card-details/card-details-view.component.ts index 6ab2795afd..55868068ca 100644 --- a/libs/vault/src/cipher-view/card-details/card-details-view.component.ts +++ b/libs/vault/src/cipher-view/card-details/card-details-view.component.ts @@ -2,8 +2,10 @@ import { CommonModule } from "@angular/common"; import { Component, Input } from "@angular/core"; import { JslibModule } from "@bitwarden/angular/jslib.module"; +import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service"; +import { EventType } from "@bitwarden/common/enums"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; -import { CardView } from "@bitwarden/common/vault/models/view/card.view"; +import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; import { CardComponent, SectionComponent, @@ -32,9 +34,17 @@ import { ReadOnlyCipherCardComponent } from "../read-only-cipher-card/read-only- ], }) export class CardDetailsComponent { - @Input() card: CardView; + @Input() cipher: CipherView; + EventType = EventType; - constructor(private i18nService: I18nService) {} + constructor( + private i18nService: I18nService, + private eventCollectionService: EventCollectionService, + ) {} + + get card() { + return this.cipher.card; + } get setSectionTitle() { if (this.card.brand && this.card.brand !== "Other") { @@ -42,4 +52,15 @@ export class CardDetailsComponent { } return this.i18nService.t("cardDetails"); } + + async logCardEvent(conditional: boolean, event: EventType) { + if (conditional) { + await this.eventCollectionService.collect( + event, + this.cipher.id, + false, + this.cipher.organizationId, + ); + } + } } diff --git a/libs/vault/src/cipher-view/cipher-view.component.html b/libs/vault/src/cipher-view/cipher-view.component.html index 9b4bfdb597..c34fc05b1d 100644 --- a/libs/vault/src/cipher-view/cipher-view.component.html +++ b/libs/vault/src/cipher-view/cipher-view.component.html @@ -29,7 +29,7 @@ - + @@ -42,8 +42,7 @@ - - + diff --git a/libs/vault/src/cipher-view/custom-fields/custom-fields-v2.component.html b/libs/vault/src/cipher-view/custom-fields/custom-fields-v2.component.html index 69aa4e9d69..6c1b8ee5f1 100644 --- a/libs/vault/src/cipher-view/custom-fields/custom-fields-v2.component.html +++ b/libs/vault/src/cipher-view/custom-fields/custom-fields-v2.component.html @@ -5,7 +5,7 @@
@@ -24,7 +24,13 @@ {{ field.name }} - + diff --git a/libs/vault/src/cipher-view/custom-fields/custom-fields-v2.component.ts b/libs/vault/src/cipher-view/custom-fields/custom-fields-v2.component.ts index b5826d82ed..01f05765bc 100644 --- a/libs/vault/src/cipher-view/custom-fields/custom-fields-v2.component.ts +++ b/libs/vault/src/cipher-view/custom-fields/custom-fields-v2.component.ts @@ -2,10 +2,12 @@ import { CommonModule } from "@angular/common"; import { Component, Input, OnInit } from "@angular/core"; import { JslibModule } from "@bitwarden/angular/jslib.module"; +import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service"; +import { EventType } from "@bitwarden/common/enums"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { CipherType, FieldType, LinkedIdType } from "@bitwarden/common/vault/enums"; import { CardView } from "@bitwarden/common/vault/models/view/card.view"; -import { FieldView } from "@bitwarden/common/vault/models/view/field.view"; +import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; import { IdentityView } from "@bitwarden/common/vault/models/view/identity.view"; import { LoginView } from "@bitwarden/common/vault/models/view/login.view"; import { @@ -37,12 +39,14 @@ import { ], }) export class CustomFieldV2Component implements OnInit { - @Input() fields: FieldView[]; - @Input() cipherType: CipherType; + @Input() cipher: CipherView; fieldType = FieldType; fieldOptions: any; - constructor(private i18nService: I18nService) {} + constructor( + private i18nService: I18nService, + private eventCollectionService: EventCollectionService, + ) {} ngOnInit(): void { this.fieldOptions = this.getLinkedFieldsOptionsForCipher(); @@ -53,8 +57,28 @@ export class CustomFieldV2Component implements OnInit { return this.i18nService.t(linkedType.i18nKey); } + async logHiddenEvent(hiddenFieldVisible: boolean) { + if (hiddenFieldVisible) { + await this.eventCollectionService.collect( + EventType.Cipher_ClientToggledHiddenFieldVisible, + this.cipher.id, + false, + this.cipher.organizationId, + ); + } + } + + async logCopyEvent() { + await this.eventCollectionService.collect( + EventType.Cipher_ClientCopiedHiddenField, + this.cipher.id, + false, + this.cipher.organizationId, + ); + } + private getLinkedFieldsOptionsForCipher() { - switch (this.cipherType) { + switch (this.cipher.type) { case CipherType.Login: return LoginView.prototype.linkedFieldOptions; case CipherType.Card: diff --git a/libs/vault/src/cipher-view/login-credentials/login-credentials-view.component.html b/libs/vault/src/cipher-view/login-credentials/login-credentials-view.component.html index f2fbb6a042..1d6c81c659 100644 --- a/libs/vault/src/cipher-view/login-credentials/login-credentials-view.component.html +++ b/libs/vault/src/cipher-view/login-credentials/login-credentials-view.component.html @@ -66,6 +66,7 @@ showToast [appA11yTitle]="'copyValue' | i18n" data-testid="copy-password" + (click)="logCopyEvent()" >
{ expect(eventCollectionService.collect).toHaveBeenCalledWith( EventType.Cipher_ClientCopiedPassword, cipher.id, + false, + cipher.organizationId, ); }); }); diff --git a/libs/vault/src/services/copy-cipher-field.service.ts b/libs/vault/src/services/copy-cipher-field.service.ts index 82a9542feb..4767ae01bc 100644 --- a/libs/vault/src/services/copy-cipher-field.service.ts +++ b/libs/vault/src/services/copy-cipher-field.service.ts @@ -125,7 +125,12 @@ export class CopyCipherFieldService { }); if (action.event !== undefined) { - await this.eventCollectionService.collect(action.event, cipher.id); + await this.eventCollectionService.collect( + action.event, + cipher.id, + false, + cipher.organizationId, + ); } }