jira-cli icon indicating copy to clipboard operation
jira-cli copied to clipboard

support "option-with-child" custom field

Open jlevon opened this issue 2 years ago • 5 comments

$ jira version
(Version="1.3.0", GitCommit="ed84fe74f68ba1b2cf0504a931ca09a03b2c9fed", CommitDate="2023-01-02T09:59:32+00:00", GoVersion="go1.19.4", Compiler="gc", Platform="linux/amd64")

Our private local JIRA has a custom field like this:

            - name: foo
              key: customfield_15160
              schema:
                datatype: option-with-child

This is a two-valued option field. Is there any way to support this field?

jlevon avatar Feb 02 '23 21:02 jlevon

Hi @jlevon, I don't see this field format in the Jira doc. Would you be able to provide some sort of reference to the documentation for this data type?

ankitpokhrel avatar Feb 13 '23 18:02 ankitpokhrel

Thanks your reply Ankit - I can't do that, I know nothing whatsoever about Jira, just what is reported back for me in that custom fields file.

However, I subsequently discovered that the problem is more basic than that - I am seeing #548 on even basic array fields

jlevon avatar Feb 14 '23 00:02 jlevon

+1 for this issue.

The option appears to be actually be a cascading select custom field, from the JIRA docs.

When I fetch an issue from JIRA's rest API directly, i see this:

{                                                                                                                                                                                                                     
  ...                                                                                                                                                                                             
  "fields": {                                                                                                                                                                                                         
    ...                                                                                                                                                                            
    "customfield_90210": {                                                                                                                                                                                            
      "self": "https://.../rest/api/3/customFieldOption/1337",                                                                                                                              
      "value": "Foobar",                                                                                                                                                                                        
      "id": "1337",                                                                                                                                                                                                  
      "child": {                                                                                                                                                                                                      
        "self": "https://.../rest/api/3/customFieldOption/123456",                                                                                                                            
        "value": "Baz",                                                                                                                                                                                          
        "id": "123456"                                                                                                                                                                                                 
      }                                                                                                                                                                                                               
    },     

Though my config shows:

issue:                          
    fields:                         
        custom: 
            - name: Foobar field    
              key: customfield_90210 
              schema:               
                datatype: option-with-child    

vikrem avatar Feb 15 '23 19:02 vikrem

Thank you for additional details @vikrem. I will check if this feature can be added quickly. PRs are welcome in the meantime.

ankitpokhrel avatar Feb 27 '23 20:02 ankitpokhrel

Any update on this? @ankitpokhrel

abhisheksoni27 avatar Jun 07 '24 05:06 abhisheksoni27