Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,364,726
Community Members
 
Community Events
168
Community Groups

How to update only a few fields with JSON import?

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

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

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

Atlassian Community Events