Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to update only a few fields with JSON import?

iotim
Contributor
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
Contributor
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
Contributor
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
Product Admin
TAGS
atlassian, atlassian government cloud, fedramp, webinar, register for webinar, atlassian cloud webinar, fedramp moderate offering, work faster with cloud

Unlocking the future with Atlassian Government Cloud ☁️

Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.

Register Now
AUG Leaders

Atlassian Community Events