sumoheavy / jira-ruby

A Ruby gem for the JIRA REST API
MIT License
654 stars 412 forks source link

Document how you get the list of the custom field names #397

Closed drewish closed 3 months ago

drewish commented 1 year ago

I was trying to figure out what field names to use for some custom fields. It took me a while to figure out that map_fields returns the results.

It might be nice put put an example like this into the docs:

Print out the full mapping of simplified labels to field names:

client = JIRA::Client.new(JIRA_AUTH)
puts client.Field.map_fields

Gives something like:

{"Parent"=>"parent", "Status_Category"=>"statusCategory", 
[...]
, "Created_At"=>"customfield_10088", "Slack_Link"=>"customfield_10089"}
bobbrodie commented 3 months ago

Hey @drewish I know it's been a while but I'm updating and preparing for version 3.0.0. Thanks for this, it's been added to https://github.com/sumoheavy/jira-ruby/wiki/Issues.