-
Notifications
You must be signed in to change notification settings - Fork 41
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
Unable to create issue due to additional required fields #36
Comments
This could be fairly easy to implement as you said, however, I'm thinking how we can implement this when creating issues without the interactive mode, any ideas? |
One temporal solution, if the project and issue type are provided and it has additional fields, enter into the interactive mode to ask for those required fields: |
Maybe provide a "generic" flag where you could pass some kind of set of key value pairs for the additional fields, maybe just a plain old JSON object (which would be cleaner to parse, but might be harder to type). I don't know about the flag parsing library you are using, but if you are allowed to repeat flags, you could do like The "go-to-interactive" thing seems like a decent stopgap, but looses some of the power you get to automate things when you have everything as a flag. |
Here is an example of the types for the project I found this issue on originally.
It looks like just strings should be okay, as my guess is all of these would have to be typed as strings for the JSON request anyways. |
What it should do
Find required fields, and allow inputting required ones
What it does
Fails to create a new issue because some fields are required for new issues on our Jira projects.
Other Info
After looking into the Jira API a bit, the
expand
query string can be set to get all fields on an issue type. However, with many projects this can be massive. I would suggest waiting to fetch a more detailed set of metadata until after the user has selected the project at the very least, maybe even better to wait until they have selected the type. The request can then be filtered down by project name and issue type to limit the returned data (see https://docs.atlassian.com/software/jira/docs/api/REST/8.1.2/#api/2/issue-getCreateIssueMeta)The text was updated successfully, but these errors were encountered: