开发者

jira4r - how to get a list of my custom fields and any attributes they may have

开发者 https://www.devze.com 2023-02-18 04:26 出处:网络
I\'m using jira4r to create and update jira tickets.I\'m trying to update a custom field a p开发者_如何学Goarticular custom field but am unable to do so.I thought I had the ID correct for the field (c

I'm using jira4r to create and update jira tickets. I'm trying to update a custom field a p开发者_如何学Goarticular custom field but am unable to do so. I thought I had the ID correct for the field (customfield_10017) but I may be wrong. Is there a way to get a list of custom field names with their IDs using jira4r? I do not have access to any of the administrative tools. Thanks


You can go through a list of them manually and maybe that will help you out..

issues = api.getIssuesFromFilter(filter_id).to_a
issues.each do |i|
customFieldValues = i.customFieldValues.to_a
  customFieldValues.each do |custom|
    if custom.customfieldId == "customfield_10319"
      value = custom.values.to_s
    end
  end
end

and if you can at least view the source of a Jira ticket, you can see the custom field and it's ID. Search the source for: customfield_

0

精彩评论

暂无评论...
验证码 换一张
取 消