Skip to main content

How do I find the Custom Field ID in Jira Cloud?

So you need to find the Custom Field ID in Jira Cloud. Perhaps you need the ID for a custom field to work on soem code, an API call or a script. How do you find it?

You can find the ID in the URL when managing custom fields

Jira - Settings - Issues - Fields - Custom Fields

https://***.atlassian.net/secure/admin/ViewCustomFields.jspa

Select "Edit" on the desired custom field

.../admin/EditCustomField!default.jspa?id=12802

There you go! It is that number at the end of the URL

Alternately, you can use ScriptRunner

Jira - Setttings - Add-ons - Script Runner - Script Console

and run the following

def issueKey = '***-####'

def result = get('/rest/api/2/issue/' + issueKey)
        .header('Content-Type', 'application/json')
        .asObject(Map)
if (result.status == 200){
    return result.body.fields
} else {
    return "Failed to find issue: Status: ${result.status} ${result.body}"
}

You get output you need to pick through, I suggest picking an issue to place in "IssueKey" with a value in the field you are looking for that is something you can search (Control + F in your web browser)
  "customfield_12802": {
    "self": "https://***.atlassian.net/rest/api/2/customFieldOption/16728",
    "value": "2Q 2018",
    "id": "16728"
  },

Comments

Popular posts from this blog

When Hiring (Job Posts)

I know this is not about Agile specifically but I wanted to share how I craft Job Posts when hiring, I would love to continue to improve my process. When writing a Job Post I do the following; Have boilerplate about the company itself. Yes, the candidate should dig more but you want them to want to apply and want to research. Describe the Role, where the department fits within the company, what the team/departments purpose is, and what normal activities the job will encompass. Indicate the type of person/passions which would work well List requirements , real requirements, this should be 5 or less, these should be demonstrable items Demonstrable - Upbeat attitude is not easy to demonstrate, for example Always have alternatives to a major! Great technical people can have humanities majors – i.e. use “or equivalent experience” List bonuses/ nice to have /additional items that a candidate would benefit by having Explain the benefits of the company (should be boilerplate tal

Jira Administration

Some things I have setup in Jira to make life better for me, with the way we work. Use Case 1: You should not close a story when sub tasks are not complete How? Jira - Workflow - Edit Transition Condition, before allowing a story to Status Category Done "All sub-tasks must have one of the following statuses to allow parent issue transitions:" (All done statuses) Use Case 2: You should not close a story until the blocker or impediment is resolved. How? Jira - Workflow - Edit Transition Condition, before allowing a story to Status Category Done "Value Field" The field Flagged will have to be not equal to value '"Impediment"'. Compared as String. Use Case 3: Set resolution when completing an item. Why? If no resolution is set some reports and metrics don't calculate correctly. How? Jira - Workflow - Edit Transition Done Post Function, Status Category = Done JMWE The value(s) of field Resolution of the current