Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Field 'customfield_xxxxx' cannot be set. It is not on the appropriate screen, or unknown. #637

Open
npwolf opened this issue Jun 23, 2023 · 4 comments

Comments

@npwolf
Copy link

npwolf commented Jun 23, 2023

Describe the bug

Please provide following details

  1. JiraCLI Version:
(Version="1.4.0", GitCommit="eb842e18014303a575fde8e19508b3c7c13982c5", CommitDate="2023-05-09T07:09:45+00:00", GoVersion="go1.19.4", Compiler="gc", Platform="darwin/arm64")
  1. Are you using Jira cloud or on-premise jira server?
SERVER INFO
-----------

Version:         1001.0.0-SNAPSHOT
Build Number:    100227
Deployment Type: Cloud
Default Locale:  en_US
  1. What operating system are you using? Also mention version.
    MacOS 13.4.1
    
  2. What terminal are you using? Also mention version.
iTerm 2 Build 3.4.19

To Reproduce

Steps to reproduce the behavior:

$ jira issue create --type Story --summary "Test delete me" --body "Test delete me" --assignee "$(jira me)" --custom team=team-awesome
? What's next? Submit

Error:
  - customfield_10001: Field 'customfield_10001' cannot be set. It is not on the appropriate screen, or unknown.

jira: Received unexpected response '400 Bad Request'.
Please check the parameters you supplied and try again.

Expected behavior
Create an issue

Additional context

In my ~/.config/.jira/.config.yml is:

            - name: team
              key: customfield_10056
              schema:
                datatype: option

and

            - name: Team
              key: customfield_10001
              schema:
                datatype: any

Without passing team, I get team is required:

$ jira issue create --type Story --summary "Test delete me" --body "Test delete me" --assignee "$(jira me)"
? What's next? Submit

Error:
  - Field team is required.

jira: Received unexpected response '400 Bad Request'.
Please check the parameters you supplied and try again.
@ZilvinasAbr
Copy link

I am having a similar issue. Essentially, in my jira config there are multiple custom fields with the same name. When I try to edit/create this custom field by the name, I get the same error.

Would it be possible to support multiple custom fields with the same name? So that the jira cli would try to find a valid custom field key that exists on the jira issue for all the custom fields with the same name?

@fine-fiddle
Copy link

fine-fiddle commented Jan 8, 2024

I believe this is related to Atlassian's change from a "Parent Link" field to the New Parent Field

The init function of Jira-cli configures whatever custom field number your "parent link" was in .config.yml under "link"

epic:
    name: customfield_#####
    link: customfield_#####

In my company, the old "Parent Link" field is now Locked, and I get the same error you do.
Screenshot 2024-01-08 at 14 33 13

As additional complexity, the new Parent field is not a normal custom field for replacing the ID in .config.yml, but I found someone online saying you can refer to it simply as "parent". I tried updating my config.yml with that and now I get the error "parent: data was not an object", which seems like some type of progress.

Also for the record I tried running init again to see if it'd automatically handle this transition, but it generated the same config file.

I think this is basically a feature request to support the New Parent Field

@ankitpokhrel - apologies if I have anything wrong here!

@engineersamwell
Copy link

I'm having the same issue as above with Atlassian's change from a "Parent Link" field to the new Parent Field. With Atlassian replacing the Epic Link field and moving to the parent field the jira-cli needs to use the 'Parent' system field in place of Epic link wherever it is referenced.

Our jira instance is removing Epic Link from the create screen to have only the parent field, this field is also required at the creation level for stories so is very helpful while using this script.

Would be great to get some traction on this!

@pdeschen
Copy link

pdeschen commented Mar 21, 2024

I believe this is related to Atlassian's change from a "Parent Link" field to the New Parent Field

I confirm on my end this seems related to parent field. Commenting out the link: ... from the config, ignores the --parent and the issue gets created without a parent.

Workaround: create issue from CLI without parent, then edit (or bulk edit) to assign parent from the UI. 🤷‍♂️

@ankitpokhrel If you give me some pointers, I could possible open a PR to support the new parent field.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants