# 共用說明改了，貼上的舊文字也會跟着更新嗎？

改一個共用區塊，逐篇看文字改了甚麼，發布狀態另行保留。

## 字一樣，不等於有共用關聯

本例 A1 連 B-support，A2 貼了一份 B-support 原文字，A3 連 B-login。有關聯的文章取區塊現值，貼文文章則留自己的文字。更新區塊不改文章原有 published 或 draft 狀態；狀態不變並非新文字已覆核的依據。

原內容組合

| 文章 | 儲存方式 | 關聯／貼上文字 | 狀態 |
| --- | --- | --- | --- |
| A1 | 有關聯 | B-support | published |
| A2 | 貼上副本 | 提供匯出工作編號。 | published |
| A3 | 有關聯 | B-login | draft |

## 真正比較更新前後文字

原先 A1、A2 都是「提供匯出工作編號。」B-support 加上「及所選篩選條件」後，只有 A1 改；A2 留原文，A3 留登入指示。A1 仍 published，A3 仍 draft。

1. 分有關聯及貼文記錄
2. 只改 B-support
3. 讀關聯區塊現值
4. 對文字及原狀態

區塊不存在便列 missing-block，不借舊貼文當現值。

B-support 加所選篩選指示，哪篇文章文字會改？

只有 A1。A2 沒有 B-support 關聯，A3 連另一區塊。文章原狀態全部不變。

## 改文字，不順手宣稱已驗證

本地輸入可改支援區塊文字，預覽逐篇列實際文字、方式及狀態。「還原例子」回原區塊；匯出含完整區塊、文章來源與讀取結果。

移除 B-support 後，A1 文字為 null、待核；A2 的貼文仍完整。區塊及文章各自最多 30 筆，編號各不重複，文字非空且不超過 120 字元。輸入只當文字顯示，不執行 HTML。

文件維護需求應記有關聯或副本、涉及哪種語言區塊及須覆核的內容。下一步可看語言版本例子；要追多層關聯，可用現有依賴教材。

## 完整本地記錄與逐項結果

```json
{
  "issuer": "Astera Technology",
  "resource": "ops-help-shared-block-impact",
  "locale": "zh-HK",
  "contract": "本例 A1 連 B-support，A2 貼了一份 B-support 原文字，A3 連 B-login。有關聯的文章取區塊現值，貼文文章則留自己的文字。更新區塊不改文章原有 published 或 draft 狀態；狀態不變並非新文字已覆核的依據。",
  "input": {
    "blocks": [
      {
        "id": "B-support",
        "text": "提供匯出工作編號。"
      },
      {
        "id": "B-login",
        "text": "使用登入支援途徑。"
      }
    ],
    "articles": [
      {
        "id": "A1",
        "kind": "linked",
        "value": "B-support",
        "status": "published"
      },
      {
        "id": "A2",
        "kind": "inline",
        "value": "提供匯出工作編號。",
        "status": "published"
      },
      {
        "id": "A3",
        "kind": "linked",
        "value": "B-login",
        "status": "draft"
      }
    ]
  },
  "output": {
    "ok": true,
    "state": "complete",
    "result": {
      "articles": [
        {
          "id": "A1",
          "text": "提供匯出工作編號。",
          "status": "published"
        },
        {
          "id": "A2",
          "text": "提供匯出工作編號。",
          "status": "published"
        },
        {
          "id": "A3",
          "text": "使用登入支援途徑。",
          "status": "draft"
        }
      ],
      "missing": []
    },
    "trace": [
      {
        "id": "A1",
        "kind": "linked",
        "source": "B-support",
        "text": "提供匯出工作編號。",
        "status": "published",
        "decision": "rendered"
      },
      {
        "id": "A2",
        "kind": "inline",
        "source": "提供匯出工作編號。",
        "text": "提供匯出工作編號。",
        "status": "published",
        "decision": "rendered"
      },
      {
        "id": "A3",
        "kind": "linked",
        "source": "B-login",
        "text": "使用登入支援途徑。",
        "status": "draft",
        "decision": "rendered"
      }
    ]
  },
  "verificationCases": [
    {
      "name": "baseline",
      "input": {
        "blocks": [
          {
            "id": "B-support",
            "text": "提供匯出工作編號。"
          },
          {
            "id": "B-login",
            "text": "使用登入支援途徑。"
          }
        ],
        "articles": [
          {
            "id": "A1",
            "kind": "linked",
            "value": "B-support",
            "status": "published"
          },
          {
            "id": "A2",
            "kind": "inline",
            "value": "提供匯出工作編號。",
            "status": "published"
          },
          {
            "id": "A3",
            "kind": "linked",
            "value": "B-login",
            "status": "draft"
          }
        ]
      },
      "expected": {
        "ok": true,
        "state": "complete",
        "result": {
          "articles": [
            {
              "id": "A1",
              "text": "提供匯出工作編號。",
              "status": "published"
            },
            {
              "id": "A2",
              "text": "提供匯出工作編號。",
              "status": "published"
            },
            {
              "id": "A3",
              "text": "使用登入支援途徑。",
              "status": "draft"
            }
          ],
          "missing": []
        }
      }
    },
    {
      "name": "material-edit",
      "input": {
        "blocks": [
          {
            "id": "B-support",
            "text": "提供匯出工作編號及所選篩選條件。"
          },
          {
            "id": "B-login",
            "text": "使用登入支援途徑。"
          }
        ],
        "articles": [
          {
            "id": "A1",
            "kind": "linked",
            "value": "B-support",
            "status": "published"
          },
          {
            "id": "A2",
            "kind": "inline",
            "value": "提供匯出工作編號。",
            "status": "published"
          },
          {
            "id": "A3",
            "kind": "linked",
            "value": "B-login",
            "status": "draft"
          }
        ]
      },
      "expected": {
        "ok": true,
        "state": "complete",
        "result": {
          "articles": [
            {
              "id": "A1",
              "text": "提供匯出工作編號及所選篩選條件。",
              "status": "published"
            },
            {
              "id": "A2",
              "text": "提供匯出工作編號。",
              "status": "published"
            },
            {
              "id": "A3",
              "text": "使用登入支援途徑。",
              "status": "draft"
            }
          ],
          "missing": []
        }
      }
    },
    {
      "name": "fresh-boundary",
      "input": {
        "blocks": [
          {
            "id": "B-login",
            "text": "使用登入支援途徑。"
          }
        ],
        "articles": [
          {
            "id": "A1",
            "kind": "linked",
            "value": "B-support",
            "status": "published"
          },
          {
            "id": "A2",
            "kind": "inline",
            "value": "提供匯出工作編號。",
            "status": "published"
          },
          {
            "id": "A3",
            "kind": "linked",
            "value": "B-login",
            "status": "draft"
          }
        ]
      },
      "expected": {
        "ok": true,
        "state": "unknown",
        "result": {
          "articles": [
            {
              "id": "A1",
              "text": null,
              "status": "published"
            },
            {
              "id": "A2",
              "text": "提供匯出工作編號。",
              "status": "published"
            },
            {
              "id": "A3",
              "text": "使用登入支援途徑。",
              "status": "draft"
            }
          ],
          "missing": [
            "A1"
          ]
        }
      }
    }
  ],
  "meaningOfNull": "該欄位未知或沒有已建立的值；請按逐項結果判斷。",
  "businessSideEffects": false
}
```
