sumoheavy / jira-ruby

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

Fetch required field for a project and issuetype combination ? #349

Closed AbhishekSharma20 closed 4 years ago

AbhishekSharma20 commented 4 years ago

Is there a way to fetch mandatory/required fields for a given combo of project and issuetype. from API I can go to /rest/api/2/issue/createmeta?projectIds=&issuetypeIds=&expand=projects.issuetypes.fields , and fetch all the fields where "required" is true. I just don't know how to do this through this gem.

SimonMiaou commented 4 years ago

You can use the Createmeta resource https://github.com/sumoheavy/jira-ruby/blob/master/lib/jira/resource/createmeta.rb

client = JIRA::Client.new(options)
client. Createmeta.all