Hi,
I will try to be brief and as accurate as possible:
But how come? For that very issue I can do that using Jira UI, so why not using REST API?
I tried (with the same results):
x["Story Points"] = "1";
and issue..CustomFields.Add("Story Points", "1" );
I noticed that even when that custom field is present until initialized with a first value, it is not returned in the list of customFields that REST api retrieves.
Thanks a lot
I ran into this issue with the C# SDK as well. What ended up working for me was editing the configuration for the 'Story Point' custom field. I had to switch it to 'Any issue type' to get it to work.
I thought maybe there was some weird thing where it didn't identify the 'Story' type correctly, but I switched it back to only having 'Epic' and 'Story' selected and it continued to work. It's almost like the 'Story' type from the initial type selection screen does not map to the same type that the edit screen maps to.
Hope this helps you out!
Hi @PietroR
the error message "customfield cannot be set. It is not on the appropriate screen, or unknown." seems to be some kind of generic where it should not be - I met this one in a recent case where a authentication issue was involved. Hard to find and also some operations worked - which made things even more complicated... so ... adding to what David said previously:
6. Use a tool like Postman to check your ability to set the value of that field on that screen using its ID
I am wondering if:
Please let Community members know about the outcome. Depending on what you see and experience somebody might be able to give more in-depth advice.
Cheers,
Daniel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @PietroR
Search this forum for 'not on the appropriate screen, or unknown' for all the times this question has been answered, for all the different reasons why that error would be returned.
Also, your question said you tried "CustomFields.Add("Story Points", "1" );", which looks like some sort of programming language you're using. Your code refers to a field named "Story Points" but you must refer to fields by their ID, not their name, as the Jira Cloud REST API documentation explains. Since the Story Points field is a custom field, you would have to refer to it something like this "CustomFields.Add("customfield_123456", "1" );"
To know what the ID of the Story Points field is, as well as all the other fields, custom or not, query the Get fields endpoint.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi David,
I did search and read the other answers but I do not believe this is this case: the field certainly is allowed on the screen because I can do that (for the given story) in Jira UI, but I cannot use the REST API.
I use the C# SDK client.
When I refer to the custom field with its ID ("customfield_XXX), I get "Could not find ...."
Please suggest what I can do, this is really important for us.
PS: Using Jira server in our company.
EDIT: I believe I use it correctly when I call the method with "Story Points" as the fieldName, because then I get this error about the inappropriate screen and the right id (customfield_XXXX) is mentioned there, so apparently the mapping took place. But makes no sense - the issue in a status where I can set the story points in the UI, so there is nothing preventing doing it programmatically using the REST API.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @PietroR
The error is giving you the right answer:
Double check your work:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi David,
as I said, these cannot be the problems, details below:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pietro
Well, it sounds like you're very sure that the problem cannot be what I am suggesting it is, so I don't think I can be of any further help.
Have fun working it, and be sure to post the solution here once you've found it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I wish it was, but from what I provided you can see for yourself that this is not the case - I checked and stated results of both your suggestions. It might be a problem in Atlassian C# SDK?
Also is it correct that custom fields with no value set are not returned in the list of custom fields for a given issue? E.g. for a newly created issue with no SPs set, this custom field is not listed unless it has been initialuzed with a value.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm having the same problem. Postman doesn't work. Story points are visible in the sidebar. I'm using the rest API directly.
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.