Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Importing Sprint field value in JSON format doesn't work Edited

I have an empty project, that is no Sprints exists. I am attempting to import issues with a Sprint field, so following the documentation I structured the JSON as follows:

... excerpt from some issue ...

"customFieldValues"
: [ { "fieldName": "Sprint", "fieldType": "com.pyxis.greenhopper.jira:gh-sprint", "value": [ { "rapidViewId": 30, "state": "Complete", "name": "New Sprint" } ] } ]

However I get an error for every issue with a Sprint field:

Cannot add value [ {state=CLOSED, name=Sprint 54 FE (05.12. - 18.12.)} ] to CustomField Sprint in Issue with summary 'new LTIs for ProTrain, DB Personas and NAP': null

 

What am I doing wrong?

2 answers

Hi Laszlo,

I have the same issue. Did you resolve this problem?

Hi Jacek,

I am afraid, it doesn't work. There is no way to correctly import the start date, end date and finish date this way.

I ended up writing a script that created the sprints and assigned the issues to the correct sprints via the REST API.

It's a pain.

Additionally, the "Finish Date" can't be set via the API either. It will be the time your script marks the Sprint as finished, which screws up the reporting.

(sigh)

Hi Laszlo,

It was working before Jira cloud update. Now it looks broken.

Thanks for your fast response :)

0 votes

Hello Laszlo,

Thank you for reaching out to Community!

I happened to notice that you raised the same request in our support portal, and my colleague, Belto, is already assisting you with this issue.

Once the issue is resolved, please feel free to reply here with the resolution, as it can help other users in the future.

Thank you for your understanding!

Regards,

Shannon

I can't get this function to work. Is there a resolution to it?

Like Dylan Brophy likes this
Belto Atlassian Team Oct 08, 2019

@Vincent Mutambuki _Mumo Systems_ If you're having trouble importing a JSON file I recommend raising a support request at support providing the file being used and specifying what exactly isn't working (errors, failure, ect...)

Thanks for your response. We have it fixed now. The sprint object was not in an Array. The warning it was throwing was misleading. 

@Vincent Mutambuki _Mumo Systems_ could you please write an example how you fixed ?

I have the very same problem as @Laszlo Torok and I do have sprint object in an array, but still get the import error:

Cannot add value [ [{startDate=2019-01-01, endDate=2019-01-14, name=OMTC 112 R, completeDate=2019-01-14, state=CLOSED}, {startDate=2018-01-15, endDate=2018-01-31, name=OMTC 113 R, completeDate=2018-01-31, state=CLOSED}] ] to CustomField Sprint in Issue with summary 'Missing Reference in measure.xml leads to VGD not measuring': null

@tomasz_zylka  - The solution is documented here 

{
  "projects": [
    {
      "name": "Project",
      "key": "KEY",
      "issues": [
        {
          "externalId": "51",
          "priority" : "High",
          "description" : "Test JSON import",
          "status" : "TO DO",
          "reporter" : "abcde-12345-fedcba",
          "issueType" : "Bug",
          "summary" : "Test JSON import",
          "customFieldValues": [
            {
              "fieldName": "Sprint",
              "fieldType": "com.pyxis.greenhopper.jira:gh-sprint",
              "value": [
                {
                  "rapidViewId": 30,
                  "state": CLOSED",
                  "startDate": "2018-01-01",
                  "endDate": "2018-01-01",
                  "completeDate": "2018-01-01",
                  "name": "New Sprint"
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}

@Vincent Mutambuki _Mumo Systems_ 

I don't know, I did what you wrote several days ago, now I repeated exactly same thing and obviously with the same result:

Cannot add value [ [{name=New Sprint, state=CLOSED, startDate=2018-01-01, endDate=2018-01-01, completeDate=2018-01-01, rapidViewId=456}] ] to CustomField Sprint in Issue with summary 'Summary of the issue': null 

This part of the JSON importer needs work, documentation also needs improving.

The example cannot be copied+pasted and still be valid JSON, so I know it wasn't tested as it is documented.

{
  "projects": [
    {
      "name": "Project",
      "key": "KEY",
      "issues": [
        {
          "externalId": "51",
          "priority" : "High",
          "description" : "Test JSON import",
          "status" : "TO DO",
          "reporter" : "abcde-12345-fedcba",
          "issueType" : "Bug",
          "summary" : "Test JSON import",
          "customFieldValues": [
            {
              "fieldName": "Sprint",
              "fieldType": "com.pyxis.greenhopper.jira:gh-sprint",
              "value": [
                {
                  "rapidViewId": 30,
                  "state": CLOSED",
--------------------------^ Missing opening quote for string "CLOSED" ---------
"startDate": "2018-01-01", "endDate": "2018-01-01", "completeDate": "2018-01-01", "name": "New Sprint" } ] } ] } ] } ] }


This is a simple JSON error, easy for me to fix.  But this makes me, as a user, wonder what other errors there might be, and I now feel unsure that your documentation is filling in the correct fields with the correct values.  Because now I can tell that the JSON in your docs was not tested.
 
And what is rapidViewId?  Isn't it related to a board?  How can a board be created through the JSON import?  Why is rapidViewId 30?

As developers making tools to transfer our data to Jira, we need to know these things.  I just want to create my program.  But what about the next 10 devs that ask themselves these questions?  For them, the answers need to be added to your documentation.

Many things are not explained in your docs, for instance what `sub-task-link` means (among other things).  So we, as developers, are referencing these community forums.  Which, I guess is sorta ok, but there is always some missing information we have to work hours to dig up.  If it were all in the json import documentation then we could find it in minutes.

I know I sound negative here.  I don't mean to, and it's not how I typically communicate.  But seriously, how can we be expected to have faith in your product if the features we need to use it are poorly documented?

I'm not proposing that Atlassian go and update the documentation and call it a day, hoping that it's perfect.  Because that's not how docs work, it's iterative, and it's never going to be perfect.

What I'm asking for is this: Can we please have the documentation updated when someone opens a question about something that isn't mentioned in the docs, if it really is an important detail? And can the documentation be tested, to remove any potential mistakes?

I hope you don't take this harshly, it's not what I mean.  I just notice that I am one of many disgruntled users (for this feature, not for Jira generally) when I look on this community.  I hope my comprehensive explanation and direct request can be more constructive than the attempts of other users.


Thanks,
Dylan

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you