Hello,
I have an issue where I have a custom field that has a default value. When creating the issue type via the UI, it auto populates with the default value and all is well.
However, when I attempt to create an issue via the Rest API, I get an error saying that I have to populate the field.
{
status: 400,
elementErrors: {
errorMessages: [
'Sample format of a DB access: Sample format of a DB access is required.'
],
errors: {}
},
failedElementNumber: 0
}
I would simply just populate the field, however the issue type that I'm using to create the issue does not have this field accessible on its create screen.
{
status: 400,
elementErrors: {
errorMessages: [],
errors: {
customfield_11098: "Field 'customfield_11098' cannot be set. It is not on the appropriate screen, or unknown."
}
},
failedElementNumber: 0
}
Is there anyway for me to get the API to populate the value the same way the UI does?
Ideally, I'd like to not alter the creation screen as we don't want users to edit this on this specific issue type.
Was this issue ever resolved @Tyler Hammer I have same issue, custom field
Watch this video might help you to resolve your issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Deepak Rai This video is generic and does not contain the answer for specific issue outlined by @Tyler Hammer
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Welcome to the community.
are the field present in the create screen when using the UI ?
If not you need to add it to this screen then make you API call.
You can't set a value for a field via API if the field is not on the screen for the operation that you will perform (create/edit)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As mentioned, it is not present on the creation screen. Ideally I'd like to not add it because its not necessary when creating it in the UI. Does the API that the quickCreate uses have some back end magic that auto populates the field with the defaultValue and the REST API for whatever reason doesn't have access to this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.