# Setting Test Case state on change

Some teams use the *State* field of the Test Case work items to track whether the particular test has been approved to perform the related verification. In case of any changes to the Test Case the approval process might need to be performed again.

SpecSync can automatically change the State field upon any changes in the scenario. To enable this feature the [`synchronization/state/setValueOnChangeTo` setting](/specsync/reference/configuration/configuration-synchronization/configuration-synchronization-state.md) has to be configured with a state value. SpecSync will set the *State* filed of the Test Case to this configured value when the scenario has changed.

The following example shows how to set the state to `Design` when the scenario has changed.

```javascript
{
  ...
  "synchronization": {
    ...
    "state": {
      "setValueOnChangeTo": "Design"
    },
    ...
  },
  ...
}
```

{% hint style="info" %}
The possible allowed values might depend on the process template your project uses.
{% endhint %}

This feature can be limited to a set of scenarios, specified by a tag expression. For that the `condition` setting has to be specified.

```javascript
{
  ...
  "synchronization": {
    ...
    "state": {
      "setValueOnChangeTo": "Design",
      "condition": "@ready"
    },
    ...
  },
  ...
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.specsolutions.eu/specsync/features/push-features/setting-test-case-state-on-change.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
