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:
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:
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:
But havent found anything that fulfills my needs.
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.
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.
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.
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 ...
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