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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

JQL for value changed in custom field

Hi,

 

I'm developing an integration between two platforms and need to connect issues in one system to Jira Cloud.

My solution for this integration is to create a custom field with webhooks that listens to "updates" on the field - if the field is empty, trigger a delete webhook, if the field is not empty - connect the issue to the recieving platforms issue (there is logic that I have developed that works for that).

My issue is that I cannot find any information about comparing the old value in the custom field with the new value (if it's different to the old value, the webhook should trigger).

What I want is something similar to Jira servers operator "CHANGED", but instead of needing to hardcode the values I want them to be dynamic:

The "CHANGED" operator is used to find issues that have a value that had changed for the specified field.

This operator has the following optional predicates:

  • FROM "oldvalue"
  • TO "newvalue"

 

With this I was thinking to do something like: "Name of my custom field" oldvalue != newvalue  
Any suggestions of what JQL I could use for this or any other method I can use to achieve this? I've checked the operator list for JQLs on Jira Cloud:

https://support.atlassian.com/jira-software-cloud/docs/advanced-search-reference-jql-operators/

But havent found anything that fulfills my needs.

Thanks!

1 answer

1 accepted

0 votes
Answer accepted

Hi @jonatan_siden  -- Welcome to the Atlassian Community!

As you note, the CHANGED operator only works for a limited number of fields, and not custom fields.  I do not believe you can do this with out-of-the-box JQL.  Have you considered investigating the marketplace for scripting add-ons?

Without getting into what your "integration" does, a work-around could be to use automation rules and another custom field to drive processing actions.  That is, the automation rule detects changes in your target custom field, and then sets a different custom field for what action to take.  Querying the action custom field for a specific value should be easy.


Best regards,

Bill

Hi @Bill Sheboy  thank you alot for the answer. It works perfectly fine - I did actually not know that there were global automation rules available for us without adding any extra plugins! this is excellent! Thank you so much. Loving this feature already.

The only thing I'm missing right now is a condition that checks wether the value in my custom free text field changes to something other than what value was there before, as well as the field is NOT empty. Do you have any suggestions of how I can set this up?

 

Just like you say, I do have another field controlling wether the webhook is triggered or not, called "connect issue" (with choices yes or no, which I have now automated to trigger the "update webhook" if the choice is yes and the "delete webhook" if the choice is no. What I need now is "issue is update" = true and "connect issue" = yes, as well as the field changes to a newValue that not equals to oldValue.

Thanks!

Best regards,

 

Jonatan

Hi @jonatan_siden 

Regarding detection of a custom field change, you probably aren't going to be able to do that with out-of-the-box JQL.

Have you looked in the Field Value Changed trigger in automation rules to see if your field is listed? That would be the easiest way to detect this, and then take action...perhaps all the way to triggering your webhook with just the one rule.

__Bill

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS
Community showcase
Posted in Jira Software

Presenting the "Best of 2020" Jira Software roundup!

Catch up with Atlassian Product Managers in our 2020 Demo Den round-up! From Advanced Roadmaps to Code in Jira to Next-Gen Workflows, check out the videos below to help up-level your work in the new ...

7,193 views 8 28
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you