---
id: JNY-PFM-DJE-002
title: Restore an accidental query-wide change after a colleague edits
feature: FEAT-PFM-DJE-02
product_area: platform
module: data-job-engine
revision: 1
status: draft
product_intent: confirmed
implementation_evidence: observed
supersedes:
  - DJE-ACC-0150
source_sha:
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
  services-crm: a8d1364f1dd44b723bb5f9acba12f983e9ec8d69
actor: ACT-PFM-035
goal: Recover from an unintended selection-wide change while preserving a colleague’s subsequent correction.
capabilities:
  - CAP-PFM-DJE-009
  - CAP-PFM-DJE-002
  - CAP-PFM-DJE-003
  - CAP-PFM-DJE-006
  - CAP-PFM-DJE-008
screens:
  - '/console/{tenantId}/queries'
  - '/console/{tenantId}/dataManagement/dataJobs/{jobId}'
  - '/console/{tenantId}/crm/contacts/{id}'
steps:
  - 'n': 1
    surface: '/console/{tenantId}/queries'
    action: Select the saved query’s 35 contacts and open Update Fields.
    capability: CAP-PFM-DJE-009
    expected: The dialog identifies the 35 selected records.
    provenance: test
    source: >-
      react-console:acceptance/data-jobs/playwright/journeys/dialogs-cross-application/DJE-ACC-0150.spec.ts#DJE-ACC-0150
  - 'n': 2
    surface: submitContactDataJob (validate)
    action: Enter the intended title and request preview.
    capability: CAP-PFM-DJE-002
    expected: The fixture preview identifies 35 eligible updates without refusals.
    provenance: test
    source: >-
      react-console:acceptance/data-jobs/playwright/journeys/dialogs-cross-application/DJE-ACC-0150.spec.ts#DJE-ACC-0150
  - 'n': 3
    surface: applyContactDataJob
    action: Approve the reviewed update.
    capability: CAP-PFM-DJE-003
    expected: The change completes and its job remains available for inspection.
    provenance: test
    source: >-
      react-console:acceptance/data-jobs/playwright/journeys/dialogs-cross-application/DJE-ACC-0150.spec.ts#DJE-ACC-0150
  - 'n': 4
    surface: '/console/{tenantId}/crm/contacts/{id}'
    action: Have a colleague correct one affected contact.
    capability: CAP-PFM-DJE-006
    expected: That later correction is saved independently.
    provenance: test
    source: >-
      react-console:acceptance/data-jobs/playwright/journeys/dialogs-cross-application/DJE-ACC-0150.spec.ts#DJE-ACC-0150
  - 'n': 5
    surface: rollbackContactDataJob
    action: Open the job and prepare restoration.
    capability: CAP-PFM-DJE-008
    expected: The fixture identifies 34 reversible contacts and one later-change exclusion with editor and time.
    provenance: test
    source: >-
      react-console:acceptance/data-jobs/playwright/journeys/dialogs-cross-application/DJE-ACC-0150.spec.ts#DJE-ACC-0150
  - 'n': 6
    surface: applyContactDataJob
    action: Approve the rollback plan.
    capability: CAP-PFM-DJE-008
    expected: The eligible contacts regain earlier titles while the later correction remains.
    provenance: test
    source: >-
      react-console:acceptance/data-jobs/playwright/journeys/dialogs-cross-application/DJE-ACC-0150.spec.ts#DJE-ACC-0150
alternates:
  - from_step: 3
    condition: The colleague makes the correction before the original approval.
    path: Use conflict inspection and a separately reviewed revalidation.
    outcome: The fixture applies 34 records initially and the remaining record after reviewed correction.
    provenance: test
    source: 'react-console:acceptance/data-jobs/playwright/journeys/dialogs/DJE-ACC-0103.spec.ts#DJE-ACC-0103'
failures:
  - from_step: 5
    condition: The original input also changed a custom value.
    path: Inspect whole-record non-reversible outcomes in the restoration plan.
    outcome: Affected records retain both the ordinary and custom-field changes.
    provenance: test
    source: 'react-console:acceptance/crm/playwright/journeys/data-operations/CRM-ACC-0659.spec.ts#CRM-ACC-0659'
rules_in_play:
  - BR-CAP-PFM-DJE-009-05
  - BR-CAP-PFM-DJE-002-02
  - BR-CAP-PFM-DJE-006-01
  - BR-CAP-PFM-DJE-008-01
  - BR-CAP-PFM-DJE-008-02
  - BR-CAP-PFM-DJE-008-03
assertions:
  - id: AS-JNY-PFM-DJE-002-01
    statement: The fixture’s 34 eligible contacts regain their pre-job values.
    provenance: test
    source: >-
      react-console:acceptance/data-jobs/playwright/journeys/dialogs-cross-application/DJE-ACC-0150.spec.ts#DJE-ACC-0150
  - id: AS-JNY-PFM-DJE-002-02
    statement: >-
      The excluded contact retains its later edit and has a changed-since explanation identifying editor
      and time.
    provenance: test
    source: >-
      react-console:acceptance/data-jobs/playwright/journeys/dialogs-cross-application/DJE-ACC-0150.spec.ts#DJE-ACC-0150
e2e_policy: required
e2e_reason: >-
  Browser coverage is required for the saved-query selection, update approval, job detail and restoration
  review that jointly protect later edits.
intent_sources:
  - 'services-crm:docs/milestones/CRM-M7-data-operations.md#D-39'
evidence: []
proved_by: []
---

# Restore an accidental query-wide change after a colleague edits

## Story

An administrator changes contacts selected by a saved query and discovers that the selection was wrong. A colleague has since corrected one of those contacts. The administrator uses job detail to prepare and review restoration, then approves the eligible work. The resulting records and exclusions let both people inspect what the recovery changed.
