---
title: "Resolving Jira to Salesforce Auto-Push failures caused by View-Only associations"
canonical: "https://support.appfire.com/space/SUPPORT/3467345994/Resolving%20Jira%20to%20Salesforce%20Auto-Push%20failures%20caused%20by%20View-Only%20associations"
format: markdown
---
This article covers the resolution for issues where Jira fields (for example, status, sprint, release dates) are not automatically updating in Salesforce despite the integration being active.

## Summary

The article addresses two primary scenarios:

1. **Configuration issue:** New or existing associations are set to "View Only" mode, preventing data flow from Jira to Salesforce.
2. **Bulk update requirement:** A large volume of existing records needs to be transitioned from "View Only" to "Auto-Push" mode efficiently.

---

## Scenario 1: associations set to "View Only"

In this scenario, the integration is authorized, but specific Jira issues do not push updates to Salesforce because the association was created in "View Only" mode.

### Cause

The "View Only" setting is enabled on the individual Jira issue's Salesforce association, which restricts the sync to one-way (Salesforce to Jira) or no-push.

### Solution: manual update

For a small number of records, you can manually enable auto-push:

1. Navigate to the affected **Jira issue**.
2. Locate the **Salesforce** panel or association configuration.
3. Disable the **View Only** toggle.
4. Enable the **Auto-Push** toggle.
5. **Save** the configuration.

---

## Scenario 2: bulk transition from "View Only" to "Auto-Push"

When hundreds or thousands of records are affected, manual updates are not feasible. This scenario requires using the Connector's API to update associations in bulk.

### Solution: scripted bulk update

You can use a shell script to iterate through a list of issues and update their association settings via the REST API.

#### Prerequisites

- A CSV file (for example, `issues.csv`) containing the Jira Issue Key and the Salesforce Object ID (SOID).
- An API Token for authorization.
- The Base URL of your Jira instance.

#### Bulk update script

The following script reads a CSV and sends a POST request to the `associations` endpoint to set `viewOnly: false` and `autoPush: true`.

```shell
#!/bin/bash

# Configuration
BASE_URL="https://<your-jira-url>/rest/com.servicerocket.jira.salesforce/1.0/api/external/associations"
TOKEN="<your-bearer-token>"
CSV_FILE="disableviewonly.csv"

# Process CSV (skipping header)
tail -n +2 "$CSV_FILE" | while IFS=',' read -r ISSUE SOID
do
    echo "Processing $ISSUE..."

    HTTP_CODE=$(curl -s -o response.txt -w "%{http_code}" \
      -X POST \
      "${BASE_URL}?jiraIssueIdOrKey=${ISSUE}&replace=false" \
      -H "Content-Type: application/json" \
      -H "Authorization: Bearer ${TOKEN}" \
      -d "[
        {
          \"son\":\"Case\",
          \"soid\":\"${SOID}\",
          \"viewOnly\":false,
          \"autoPush\":true,
          \"autoPull\":false
        }
      ]")

    if [[ "$HTTP_CODE" == "200" || "$HTTP_CODE" == "201" || "$HTTP_CODE" == "204" ]]; then
        echo "SUCCESS - $ISSUE"
    else
        echo "FAILED - $ISSUE (HTTP $HTTP_CODE)"
        cat response.txt
        echo "${ISSUE},${SOID},${HTTP_CODE}" >> failed.csv
    fi

    # Small delay to prevent rate limiting
    sleep 0.2
done

rm -f response.txt
echo "Completed."
```

#### API endpoint details

- **Method:** `POST`
- **Endpoint:** `/rest/com.servicerocket.jira.salesforce/1.0/api/external/associations`
- **Query parameter:** `replace=false` (to update existing rather than overwrite all)
- **Payload example:**

```json
[
  {
    "son": "Case",
    "soid": "500g500000gsx7lAAA",
    "viewOnly": false,
    "autoPush": true,
    "autoPull": false
  }
]
```

### Prevention

To avoid this issue for future records, ensure that the **Default Association Configuration** in the Connector settings is set to enable **Auto-Push** by default instead of "View Only".