Jira Align API for Story creation

HanumaSiva Chikkam May 10, 2022

Hello Community,

I was using Jira Align API's for story creation which was working fine until yesterday and today I am seeing a weird error when doing the same. Below is the error I am receiving while creating the Story via API.

Any leads are appreciated.

Cannot create story. Following properties: 'owner' are required.

URL - I am using

https://xxxx.jiraalign.com/rest/align/api/2/Stories

 

{
  "title""Delete-Define requirements for each hold type and its process flow (OBO/PBO) 1",
  "description""As a BA I want/need to  so that I can ",
  "state"0,
  "type"1,
  "mmf"0,
  "automation"null,
  "programId"5,
  "ownerId""68",
  "featureId"4423,
  "releaseId"27,
  "releaseVehicleIds"null,
  "teamId"81,
  "iterationId"null,
  "valuePoints"1,
  "effortPoints"1,
  "tags""TEST",
  "assumption""string",
  "personaId"null,
  "developmentalStepId"null,
  "operationalStepId"null,
  "isAccepted"0,
  "splitType"0,
  "splitReason""string",
  "externalProject"null,
  "jiraProjectKey"null
}

2 answers

0 votes
Mark Cruth
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 10, 2022

Hi @HanumaSiva Chikkam ! Thanks for reaching out! I tried your json and it appears to work for me (after changing some of the numbers to match my own instance). Did you try changing the Owner ID value to something else (another valid user)? Curious if it has to do with the user record. Let me know if you can create a story by changing some of the variables. 

HanumaSiva Chikkam May 10, 2022

Hi, I tried with different user id's and still the same error.

Mark Cruth
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 10, 2022

Another troubleshooting trick is to strip out all the non-required fields from the json to see if you can create the story. Check whatever field are required and only include those in the payload...see if that works.

HanumaSiva Chikkam May 10, 2022

No luck, same error :(

Mark Cruth
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 10, 2022

I was just able to recreate the error by making the "Assignee" field on a story required. Can you check the details panels settings for the portfolio to see if assignee is required? If it is, trying removing the requirement to see if you can create the story. 

 

Additionally, I see you've set a team in the json...are the individuals you are assigning to the story part of that team? Check that too.

HanumaSiva Chikkam May 10, 2022

The assignee field is mandatory as per company config. This issue is not seen when creating manually and then trying to GET that story via API, I can see the JSON fine and I compared it with the POST as well I don't see any variation in the data sent in JSON for creation but its giving the error.

JSON - GET payload

[
    {
        "id"26189,
        "title""TEST",
        "description""TEST Desc",
        "state"0,
        "type"1,
        "mmf"0,
        "automation"null,
        "programId"5,
        "ownerId""218",
        "featureId"4657,
        "releaseId"27,
        "releaseVehicleIds": [],
        "teamId"79,
        "iterationId"null,
        "valuePoints"1,
        "effortPoints"1,
        "tags"null,
        "assumption"null,
        "personaId"null,
        "processStepId"null,
        "createdBy""443",
        "createDate""2022-05-10T08:39:19Z",
        "lastUpdatedDate""2022-05-10T08:49:19Z",
        "lastUpdatedBy""443",
        "isRecycled"null,
        "acceptedDate"null,
        "isAccepted"null,
        "acceptedBy"null,
        "parentSplitId"null,
        "splitType"null,
        "splitReason"null,
        "isParentSplit"null,
        "isCanceled"null,
        "externalProject"null,
        "externalId"null,
        "externalKey"null,
        "jiraProjectKey"null,
        "connectorId"null,
        "itemToSyncDate""2022-05-10T08:49:19Z",
        "customFields"null,
        "links": [],
    }
]
Mark Cruth
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 11, 2022

@HanumaSiva Chikkam so you were able to manually create the same story via the UI, but the same data wouldn't pass through the API POST command with all the attributes of the story being the same (specifically the Assignee / OwnerID)? 

HanumaSiva Chikkam May 11, 2022

True

Mark Cruth
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 11, 2022

At this point I think you'll need to get Atlassian Support involved. Submit a ticket here: https://support.atlassian.com/contact/#/

 

Hopefully support can dig in a little deeper to see what might be up with your instance :) 

HanumaSiva Chikkam May 11, 2022

Sure, thanks for looking into it. I will work with support.

0 votes
HanumaSiva Chikkam May 10, 2022

Hi @Mark Cruth any inputs are highly appreciated.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events