Smart values 'deletedFieldChange.valueIds' is returning 'addedFieldChange.valueIds'

Northern Kentucky Stargazers
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 4, 2024

I'm using Jira Server and having issues getting the correct values returned from 'deletedFieldChange.valueIds' in an Automation. I'm logging these values to changelog so I can see them. 

Screenshot 2024-04-04 at 2.32.35 PM.png

The automation syntax, as far as I can tell, is correct.

Screenshot 2024-04-04 at 2.34.19 PM.png

I based it off the documentation for smart values. I see in some comments these shouldn't be compatible with the server version, but I don't understand why it would return the added value but have an issue with the deleted value.

Any help is appreciated.

3 answers

1 accepted

0 votes
Answer accepted
Kalyan Sattaluri
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.
April 4, 2024

Hello @Northern Kentucky Stargazers 

What you are seeing logged is smart value {{issue.customfield_24804}} and not the {{addedfieldChange.valueIds}} or {{deletedfieldChange.valueIds}} .

The addedfieldchange and deletedfieldchange are only available in Cloud, not in DC edition.

 

You *could* try:

{{changelog.issue.customfield_24804.fromString}}

{{changelog.issue.customfield_24804.toString}} 

But @Bill Sheboy has pointed out that there is a defect out even in the changelog.. at least for Versions field.. so try above to see if you are getting the added/deleted values correctly... Again, cautioning because there could be defect where results are wonky.

Northern Kentucky Stargazers
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 5, 2024

@Kalyan Sattaluri Thank you! Your answer pointed me in the right direction. I was able to find what I was looking for using:

{{changelog.Field Name.to}} and {{changelog.Field Name.from}}

It's odd that I had to use the name of the field and not the 'customfield' ID. Using to and from gives me a list of the values that I need to compare.

Thank you!

Like Kalyan Sattaluri likes this
Kalyan Sattaluri
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.
April 5, 2024

Ah yes. Now I remember.. when looking at changelog entries from rest API, like below URL, it only references field name and not custom fields. I  forgot about that. But glad you looked into it and thanks for the headsup so I remember next time!

https://youdomain.net/rest/api/2/issue/ISSUE-63?expand=changelog  

0 votes
Dan Breyen
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.
April 4, 2024

Hi @Northern Kentucky Stargazers welcome to the community.  I looked on Atlassian's Jira site and found this issue that looks really close to what you're getting.  If you agree, you could probably add some comments to it and then vote for and watch it for updates.

 

 

 

0 votes
Bill Sheboy
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.
April 4, 2024

Hi @Northern Kentucky Stargazers -- Welcome to the Atlassian Community!

Without seeing your entire rule and the specific field-change the rule is triggered upon...

  • There are known problems with changelog accuracy for some list fields, such as Fix Version and Sprint for Jira Cloud.  For example: https://jira.atlassian.com/browse/JRACLOUD-80486
  • Also, you are referencing smart values documented for Jira Cloud and which are not listed for the Server / Data Center version of automation

Putting those things together, I suggest the behavior of those smart values is undefined for Jira Data Center.  I have personally tried some Server / Data Center smart values, such as {{issues}}, with Jira Cloud and observed unpredictable behavior.

 

I recommend working with your Jira Site Admin to contact Atlassian Support to learn what they say about the expected behavior: https://support.atlassian.com/contact/#/  When you hear back from them, please post what you learn to benefit the community.  Thanks!

 

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer