Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't move issues to sprint #122

Closed
manish-makwana opened this issue Jul 29, 2020 · 9 comments
Closed

Can't move issues to sprint #122

manish-makwana opened this issue Jul 29, 2020 · 9 comments

Comments

@manish-makwana
Copy link

Expected

Running jira edit doc-62 "sprint::103" will move the issue into sprint with ID 103.

Actual

Command fails with lots of debugging info and error text "Number value expected as the Sprint id.".

Troubleshooting

  • I've checked the docs and examined the custom field used for my jira instance - "customfield_10020". Updated config.json accordingly:
"sprint": {
      "key": "customfield_10020",
      "type": "number"
    },
  • tried interactively running jira edit. same error.
  • double checked the sprint ID with jira sprint -r doc.

Thanks for any assistance!

@palashkulsh
Copy link
Owner

@manish-makwana I just checked editing a sprint for an issue and it worked. Can you please try following things

  • try installing jira-cmd latest if its a bit old (npm install -g jira-cmd) . From what i can remember, this issue was in older versions of jira cmd.

  • try to see output if issues in a sprint by using command
    jira jql "cf[10007] = 23 and assignee=currentUser()" .and check if it shows the issues assigned to you in a sprint with id 23

  • there can be some info that we are missing or there can be some different configuration in the jira cloud setup.

@manish-makwana
Copy link
Author

thanks, this is the latest version.

Running the above command, tailored to my setup (jira jql "cf[10020]=103 and assignee=currentuser()"), shows the issues assigned correctly.

I piped the error stack to a text file, sanitised (hopefully) my company info and have attached here. Maybe that will help?

error.txt

@palashkulsh
Copy link
Owner

palashkulsh commented Jul 30, 2020

@manish-makwana
can you please try installing npm i -g git+https://github.com/palashkulsh/jira-cmd.git#manish_debug i have added some debugging info in it

once new one is installed just run your edit command and please share the output printed at the start of the log like this

****************
{
  "fields": {
    "customfield_10007": 6173
  }
}
****************

@manish-makwana
Copy link
Author

sure:

****************
{
  "fields": {
    "customfield_10020": [
      "103"
    ]
  }
}
****************

@palashkulsh
Copy link
Owner

strange why is it taking 103 inside an array, it should have taken 103 like the output i shared.
IF POSSIBLE can you please share screenshot of schema of your config.json and schema of customfield_10020 from api
<your domain>/rest/api/2/issue/createmeta?projectKeys=doc&expand=projects.issuetypes.fields&

@palashkulsh
Copy link
Owner

@manish-makwana can you please check if there is a __schema object in your config.json if not please try adding it

edit_meta: {
   __schema:{
        "customfield_10020": {
        "type": "number"
      },
   }
}

just to be sure, above should be added along with existing data in edit_meta in proper json format

@manish-makwana
Copy link
Author

-facepalm- got it working - __schema was still using "customfield_10007". changing it to "customfield_10020" allowed the command to run!!!

Issue edited successfully!

  • Verified on the web interface!

Thanks so much!!

So is it possible for me to move an item out of the sprint and back into the backlog?

@palashkulsh
Copy link
Owner

Im afraid its not possible as of now to remove an issue from spriint! I can not find anything in documentation info on how to remove a sprint from an issue.

@manish-makwana
Copy link
Author

no problem, this is good enough for now! thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants