Response is: {"errorMessages":[],"errors":{"Affects Version/s":"Field 'Affects Version/s' cannot be set. It is not on the appropriate screen, or unknown."}}
Does anyone who know about this? The value exists in the project.
This is what it says it is - if you go into the UI and try "create issue", you will find that the affects version field is not asked for.
Either remove it from your REST call, or add it to the create screen so it can be filled in.
(There is one other way to get this message - it might be that the user account you are using to make the call does not have permission to see or create issues in thsy project.
Hi NIc, Yes, I understood. What I meant is that we already have Affects Version/s field on the create screen and we tried to create it in Jira and it succeeded. But when we call API, it always showed the error message. I also checked the user's access and she has the project create issue permission. So there's no other possible reason?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you log in as the user using the REST call, and try to create an issue of the same type that your REST call?
Are you offered the affects version field then? Also, if so, is it the first field on the screen (other than summary, issue type and project)?
(Basically, we need to check all the things it could be by trying it in the UI - are you sure you're using the same user for the REST call, same issue type so it should have the same fields, etc)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
the affected version has drop down list in the jira screen while creating a ticket. In the java script when i give + "\"Affects Version/s\":{\"name\":\"values\"}," it gives error as Response is: {"errorMessages":[],"errors":{"Affects Version/s":"Field 'Affects Version/s' cannot be set. It is not on the appropriate screen, or unknown."}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is it an issue of the same type as the one you tested in the UI? Same project? Same user?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nic,
You just mentioned the first field on the screen other than summary. So if it's not, will it have influence? I think others we are all OK.
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.
Can you give us the full text of the command you are running (obscure the URL you are calling and the content of fields you don't want us to see).
And a screenshot of the create issue screen might be helpful.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i am using the below command:
createData = "{\"fields\":{" + "\"project\":{\"key\":\"" + pty.getProperty("DQDefaultProjectKey") + "\"},"
+ "\"issuetype\":{\"name\":\"Production Bug\"},"
+ "\"Affects Version/s\":{\"name\":\"\"},"
+ "\"summary\":\"Issue with: " + element1 + " for table: " + table + " in domain: " + domain1 + ""
+ "\"," + "\"description\":\""
+ "DataElement: " + rs.getString("BIZ_FIELD_NAME")
+ " failed DQ check for rule: " + rs.getString("RULE_NAME") + ". "
+ "Current DQ score is: " + rs.getString("DQ_SCORE") + ". The bad record file is available at: " + pty.getProperty("DQExceptionFilePath") + exceptionFilePath
+ "\","
+ "\"priority\":{\"name\":\"" + getPriority(rs.getString("PRIORITY")) + "\"},"
+ "\"reporter\":{\"name\":\""
+ pty.getProperty("DQTaskDefaultReporter") + "\"},"
+ "\"assignee\":{\"name\":\""
// + getTaskAssignee(rs.getString("STEWARD"), pty).replace(pty.getProperty("LenovoDomain"), "") + "\"}";
+ pty.getProperty("DQTaskDefaultReporter") + "\"}";
createData = createData + "}}";
System.out.format("%s: createData for Task is: %s\n", thisClass, createData);
logger.debug("createData for Task is: " + createData);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That's not a command, it's only the content you're sending, but it is the problem.
I should have spotted this sooner, I'm sorry. You did give us the information I needed to spot the problem earlier, but I missed it.
The error is correct - there is no "Affects version/s" field on your screen. Because that's not the real name of the field. The field is a system one, which is shown with one name, but in the background has a different name.
Try sending "versions" instead of "Affects Version/s"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
super. Thanks it worked .
i made the change to + "\"versions\":[{\"name\":\"value\"}]
and it worked. Many thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Jason Liu
The respective field should be on the screen to add the value via API. Please check
Thanks,
Pramodh
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.