From 610537535a73c6b250de3c9287c13348b5a7756d Mon Sep 17 00:00:00 2001 From: Nick Krantz <125900171+nick-livefront@users.noreply.github.com> Date: Mon, 17 Nov 2025 14:14:03 -0600 Subject: [PATCH] persist archive date when cloning a cipher (#16986) --- .../src/cipher-form/components/cipher-form.component.spec.ts | 4 ++-- .../vault/src/cipher-form/components/cipher-form.component.ts | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/libs/vault/src/cipher-form/components/cipher-form.component.spec.ts b/libs/vault/src/cipher-form/components/cipher-form.component.spec.ts index a002956b54a..1e60ad91fb1 100644 --- a/libs/vault/src/cipher-form/components/cipher-form.component.spec.ts +++ b/libs/vault/src/cipher-form/components/cipher-form.component.spec.ts @@ -154,13 +154,13 @@ describe("CipherFormComponent", () => { expect(component["updatedCipherView"]?.login.fido2Credentials).toBeNull(); }); - it("clears archiveDate on updatedCipherView", async () => { + it("does not clear archiveDate on updatedCipherView", async () => { cipherView.archivedDate = new Date(); decryptCipher.mockResolvedValue(cipherView); await component.ngOnInit(); - expect(component["updatedCipherView"]?.archivedDate).toBeNull(); + expect(component["updatedCipherView"]?.archivedDate).toBe(cipherView.archivedDate); }); }); diff --git a/libs/vault/src/cipher-form/components/cipher-form.component.ts b/libs/vault/src/cipher-form/components/cipher-form.component.ts index 5e75ea5bc24..f94af25e90a 100644 --- a/libs/vault/src/cipher-form/components/cipher-form.component.ts +++ b/libs/vault/src/cipher-form/components/cipher-form.component.ts @@ -281,7 +281,6 @@ export class CipherFormComponent implements AfterViewInit, OnInit, OnChanges, Ci if (this.config.mode === "clone") { this.updatedCipherView.id = null; - this.updatedCipherView.archivedDate = null; if (this.updatedCipherView.login) { this.updatedCipherView.login.fido2Credentials = null;