How to update only a few fields with JSON import?

iotim September 12, 2022

I'm getting the following error:

"1 of 1 issues have been skipped because they already exist in destination projects."

All I'm sending is the key and a custom field.  Any advice?  Is this possible?  Below is my sample JSON.

{
    "projects": [
        {
            "name": "MyProject",
            "key": "AB",
            "issues": [
                {
                    "key": "AB-50",
                    "customFieldValues": [
                        {
                            "fieldName": "User\/Customer",
                            "fieldType": "com.atlassian.jira.plugin.system.customfieldtypes:textfield",
                            "value": "Test"
                        }
                    ]
                }
            ]
        }
    ]
}

2 answers

1 accepted

0 votes
Answer accepted
iotim September 19, 2022

Well, I don't think you can.  Instead I wrote a php script using curl and basic authentication.  For the next guy, the following links helped me.  

https://developer.atlassian.com/cloud/jira/platform/basic-auth-for-rest-apis/

https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-put

0 votes
iotim September 13, 2022

Can anyone help with this?   I really don't want to write an app just to do this simple task.  I looked into CSV import to alter a single field, but it says that if you do not send all the fields, the ones not sent are set to their defaults.  I can't believe there isn't a method to do an update via JSON. 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events