Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Having trouble with custom field in Automation JQL

Yossi Geretz September 18, 2024

I have a field named StandupFlag which we use to flag items for discussion at the upcoming standup. I'm trying to write an automation script which will clear these flags en masse after we finish our standup meeting.

standup.jpg

This little elegant snippet is what I finally found. I have no idea what it means, but it's the first thing I found which parses OK. The ID of the field is 10038. That is confirmed.

{{#issue.customfield_10038}}"{{.}}"{{^first}} ,{{/}}{{/}} = "Standup"

Here's the error I'm getting:

DEV-54: "(("Standup" = "Standup") AND (key != DEV-54)) AND (project in (10001)) AND (updated >= -3m)" - Field 'Standup' does not exist or you do not have permission to view it.

Note that the elegant little snippet of JQL has resolved to the string literal "Standup". Yes! This is the value of the StandupFlag field so obviously the StandupFlag was interrogated properly for that ticket to produce its value. So what's with the error message? I'm not referencing a field named Standup. I'm comparing a string literal "Standup" to the match string "Standup". This should evaluate to true!

Thanks for your advice!

 

1 answer

3 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 18, 2024

I believe that the problem is in your JQL in the left side where you put the field name you have entered Standup but you have otherwise stated that the field name is StandupFlag. In the JQL you are not comparing two values to each other. You are telling Jira to compare the value you supplied on the right side to the value in the field you identify by field name on the left side.

Darryl Lee
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 18, 2024

I think Trudy's nailed it. Maybe try flipping it around:

"StandupFlag" = {{#issue.customfield_10038}}"{{.}}"{{^first}} ,{{/}}{{/}}

 

Like Steffen Opel _Utoolity_ likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events