Through the Jira CLI 2.3.0 version I am trying to create an issue as jira -
a createIssue --project "ADQA" --type "QA Task" --fixVersions "SPP-700" --custom
"Milestones:M01" --components "Feature Testing" --verbose --debug --summary "In
Test"
Milestones is a custom field and the user test has project administration rights. Now, when I run the CLI, it errors out saying
Successful login to: http://dev:8080/rpc/soap/jirasoapservice-v2 b
y user: test
Warning: user is not an administrator. Custom fields cannot be validated. Use co
rrect custom field ids!
Remote error: com.atlassian.jira.rpc.exception.RemoteValidationException: Custom
field ID 'Milestones' is invalid.
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: com.atlassian.jira.rpc.exception.RemoteValidationException: Custom
field ID 'Milestones' is invalid.
faultActor:
faultNode:
faultDetail:
{}com.atlassian.jira.rpc.exception.RemoteValidationException:null
If I give the user jira-administrators permission, then the same create issue goes through fine. Cant a project administrator create issues with custom filed? Do we need to be jira-administrators to do the same?
Attached the exception (CLI.txt)
Yes, you can create issues with custom fields, but, if you are not an administrator you need to use the custom field id instead of the name. This is because the name must be converted to the id based name and administrator authority is required to retrieve the list of all custom fields so the mapping can be made. So, you need to use something like:
customfield_10100
Note: that on the most recent versions of the CLI, non-administrators can now use custom field names as well as the ids.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
After trying to create an epic I got this message
Remote error: com.atlassian.jira.rpc.exception.RemoteValidationException: {customfield_10401=Epic Name is required.}
After reading this ticket I tried
--action createIssue --project AMC --type "epic" --summary "This is CLI test" --customfield_10401 "test" --assignee philippe
but I am still getting Error: Unknown flag 'customfield_10401'.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Bob, is there something that can be changed at the database level to allow access to the custom field names for non administrators? For us it is a security risk and replacing the custom field names with numbers makes the code much less readable and not portable between our dev and prod system.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Not in the near term, see JCLI-372.
Let me take that back, there is a new API now. Please watch that issue and comment on what version of JIRA you have.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I did include the custom fields but i still got the following error, if i remove the custom fields and try to creae an issue on a different project it seems to work fine...
my $call = $jira->call("jira1.createIssue", $auth, {
'project' => 'XYZ',
'type' => 1,
'summary' => $summary,
'description'=>$description,
'assignee' => $user,
'reporter' => $reporter,
'customfield_10202' => $user,
'customfield_10100' => 'Performance',
'customfield_10004' => 88.067,
java.lang.Exception: com.atlassian.jira.rpc.exception.RemoteValidationException: {customfield_10202=Verifier is required., customfield_10100=Initiative is required., customfield_10004=Found in Build is required.} : [] at openJiraTicket.pl line 40.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are not using the JCLI, so, your question isn't related to the other question, you should post your own question.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.