When I attempt to Sync the Status field of one project to a custom field “Engineering” in another (via Jira Cloud, same Jira instance), I get the following error:
Field Field ‘customfield_10181’ cannot be set. It is not on the appropriate screen, or unknown.: customfield_10181.
I have verified that the Engineering Status field is on the screen used in the project I’m sending the value to.
Issue has been resolved by adding the issuetype condition. Error happened as earlier code trying to update this field for ServiceRequest Type. After giving condition of applicable issue type in the connection script issue is resolved and sync of SR tickets working.
Can you get the output of following rest call where you change the <issuekey> placeholder with the key of the issue where you want to update the field, and the host with the appropriate host
Francis Martens (Exalate) Thank you so much for your response. When I try the editmeta rest call, it just returns
{"fields":{}}.
When I set the custom field by hand, I do data returned, but I'm not sure what to with it.
Here are the snippets that list my custom field 10182:
{"expand":"renderedFields,names,schema,operations,editmeta,changelog,versionedRepresentations,customfield_10169.properties,customfield_10010.requestTypePractice","id":"10182","self":"https://wenergysoftware.atlassian.net/rest/api/3/issue/10182","key":"LDP-60","fields":{"statuscategorychangedate":"2021-08-18T16:32:00.519-0500","parent":{"id":"10146","key":"LDP-49","self":"https://wenergysoftware.atlassian.net/rest/api/3/issue/10146","fields":{"summary":"Populate Knowledge Base with Docs","status":
{"self":"https://wenergysoftware.atlassian.net/rest/api/3/resolution/10000","id":"10000","description":"Work has been completed on this issue.","name":"Done"},"customfield_10113":null,"customfield_10114":null,"customfield_10107":null,"lastViewed":null,"customfield_10060":null,"customfield_10061":null,"customfield_10182":null,"customfield_10062":null,"customfield_10183":null,"customfield_10063":null,"customfield_10064":null,"customfield_10065":null,"customfield_10100":null,"priority":
Other things to note: I have another field that is doing the same thing, but it is also mapping the status of one project to a custom column in another. It appears that trying to map this visually works the first time, but then fails, but I can’t use visual mapping because I have other complicated mapping.
I’m not fluent in JSON, but the response I received doesn’t seem as helpful as the responses in the examples provided at the link you references. I don’t see my available values, for one.
The reason I need this to update is because we currently create linked stories via automation in separate projects and those links have the status easily available on the ticket. This isn’t the case with Exalate. With Exalate, you have to actually go to the side panel and open the link to see the status in another project. That won’t work for us.
Francis Martens (Exalate) commented on 25 January 2022
No idea why editmeta is not returning any data …
Regarding the second call - Did you do the rest call after setting the field?
Because it is not in the output - check it out.
What is the type of that field?
Destri Weir commented on 25 January 2022
I now have a return on the edit meta (totally user error before):
customfield_10182":{"required":false,"schema":{"type":"option","custom":"com.atlassian.jira.plugin.system.customfieldtypes:select","customId":10182},"name":"Linked Engineering Status","key":"customfield_10182","operations":["set"],"allowedValues":[{"self":"https://wenergysoftware.atlassian.net/rest/api/3/customFieldOption/10660","value":"To Do","id":"10660"},
And the following for the field with the manual set:
"name":"Linked Engineering Status","key":"customfield_10182","operations":["set"],"allowedValues":[{"self":"https://wenergysoftware.atlassian.net/rest/api/3/customFieldOption/10660","value":"To Do","id":"10660"},{"self":"https://wenergysoftware.atlassian.net/rest/api/3/customFieldOption/10661","value":"In Progress","id":"10661"},{"self":"https://wenergysoftware.atlassian.net/rest/api/3/customFieldOption/10662","value":"In Review","id":"10662"},{"self":"https://wenergysoftware.atlassian.net/rest/api/3/customFieldOption/10663","value":"Done","id":"10663"}]},
So, it looks like it should be able to be set to the options that are available in the status list of the linked project.
Francis Martens (Exalate) commented on 25 January 2022
Ah - it is a dropdown field.
Can you try to set it to an option that is available.
Destri Weir commented on 25 January 2022
I just added a default of one of the available options in project B to the column, and it’s finally working.
I owe you a drink, but I hope you’ll settle for a few points and upvotes or whatever I’m limited to here.
Francis Martens (Exalate) commented on 25 January 2022
I can write to any sort of field type. I switched it to a ddl because I thought that it might not be working because I was sending a ddl to a text field before.
It looks like if I comment out that line in the sync and the sync runs successfully and then I uncomment the line, it updates as expected. Any idea what could be causing this?
Destri Weir commented on 25 January 2022
Essentially, I want to Exalate to create a ticket in our engineering project when the status of the Support story changes to Code Change, which it does. I then want the system Status column on the engineering ticket to update a custom “Linked Engineering Status” column on the Support ticket, so that Support is aware of the status of the ticket in Engineering without having to actually go to the side panel and open the ticket and see the status. I don’t care how I achieve this but I do prefer to do it though a column that is reportable.
I can’t figure out why it works once the column has had a value entered, but this isn’t a column where a value would normally be set by Support.
Pranith Gidijala commented on 09 May 2022
Hi Destri Weir , I am just wondering if you got any solution. I am also facing same error for Jira sync. However, i am still unable to find any solution for this.
Hi Ariel Aguilar , I tried both options and still getting same error
Ariel Aguilar commented on 09 May 2022
What type of field is this? Can you share the incoming script from Jira Cloud.
Pranith Gidijala commented on 09 May 2022
This is multi select field
services.jcloud.exception.UpdateIssueJiraCloudException: Could not update issue `XXX-4321` with id `89359`: Field customfield_10232: Field ‘customfield_10232’ cannot be set. It is not on the appropriate screen, or unknown… at services.node.JCloudTrackerExceptionCategoryService.generateUpdateIssueJiraCloudTrackerException(JCloudTrackerExceptionCategoryService.scala:421) at
Below is script
if(firstSync){
issue.projectKey = “BDL”
// Set type name from source issue, if not found set a default
issue.typeName = nodeHelper.getIssueType(replica.type?.name, issue.projectKey)?.name ?: “Task”
}
issue.summary = replica.summary
issue.description = replica.description
issue.comments = commentHelper.mergeComments(issue, replica)
issue.attachments = attachmentHelper.mergeAttachments(issue, replica)
issue.labels = replica.labels
issue.status = replica.status
Tried additional below lines ,however it did not resolve the issue.