Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Referencing a Custom Field in JQL

Robert Werner
Contributor
February 13, 2018

I created a custom field in 3 JIRA projects called "Organizations" to mirror the built-in "Organizations" field in Jira Service Desk.

Using Jira Automation, I've successfully built a rule that correctly sets "Organizations" depending on certain criteria.  This works perfectly!

Now I'm trying to expand the JQL Condition such that it doesn't set it again if it's already set.  I've tried several things to reference my customer "Organizations", whose Custom Field Id = 10538.  But nothing I've tried works.

Any ideas what the proper syntax is?

Robert

1 answer

0 votes
Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 13, 2018

You should begin to type Organizaions and you will be able to see 2 fields. Then choose your custom field

Robert Werner
Contributor
February 14, 2018

Yes, that works in that portion of Automation.  But I'm specifically looking to see how I reference the Organizations custom field in JQL.

Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 14, 2018

You reference it the same way as in Automation. Just type it in the search text field.

Robert Werner
Contributor
February 14, 2018

I don't think we're talking about the same thing.  This is the JQL dialog in Jira Automation.  Notice that there's no place to search for "Organizations".  I even double-checked by clearing this text and typing "Organizations" (without the quotes) but it did not recognize it.Screen Shot 2018-02-14 at 9.56.58 AM.png

Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 14, 2018

Ah, ok. This plugin is called Automation For Jira. I just checked it and I also was not able to work with two fields with the same name there. I guess, you would need to change the name of your "Organizations" custom field.

Like • Zachary Jones likes this
Robert Werner
Contributor
February 15, 2018

Thanks, Alexey.  I will try creating an "Organization" field for my three non-JSD projects and see if that allows me past this obstacle.

Like • Wataru Sasaki likes this
Robert Werner
Contributor
February 16, 2018

@Alexey Matveev : Thank you for your patience.  I just created an "Organization" field to replace my custom "Organizations" field.  This solved the problem.

Here's one of my sample JQL queries which only sets the field if it is empty:

organization IS EMPTY AND (summary ~ "starbucks" OR description ~ "starbucks")


Two notes for others:

  1. The custom field can be written in case-insensitive manner.
  2. The custom field can be written with or without quotes.
Like • Zachary Jones likes this

Suggest an answer

Log in or Sign up to answer