ankitpokhrel / jira-cli

🔥 Feature-rich interactive Jira command line.
MIT License
3.9k stars 197 forks source link

support "option-with-child" custom field #567

Open jlevon opened 1 year ago

jlevon commented 1 year ago
$ 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?

ankitpokhrel commented 1 year ago

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?

jlevon commented 1 year ago

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

vikrem commented 1 year ago

+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    
ankitpokhrel commented 1 year ago

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

abhisheksoni27 commented 3 months ago

Any update on this? @ankitpokhrel