Use changelog in smartvalue automation
Asked by ????? ?????:

I made a new automation rule and set up a trigger that checks the fullness of the "DueDate" field and, depending on the presence of a value inside the field, makes a label in the task. The example in picture 1.

pict. 1

![?????? ?????? 2024-08-01 ? 16.48.34.png](/t5/image/serverpage/image-id/339444i6B6140E3877E7BF0/image-size/large?v=v2&px=999 "?????? ?????? 2024-08-01 ? 16.48.34.png")

But I encountered a difficulty in another project, where the "Due Date" field is not standard, but is set up through custom fields.

![?????? ?????? 2024-08-01 ? 14.49.49.png](/t5/image/serverpage/image-id/339448i947A106BC97FE99D/image-size/large?v=v2&px=999 "?????? ?????? 2024-08-01 ? 14.49.49.png")

**How do I create a rule to check whether this field is full, if it is custom?**

The name of this field in the DataBase: customfield_10030

I've tried to make similar designs, but it don't work. Picture 2 and picture 3

pict.2

![?????? ?????? 2024-08-01 ? 16.49.23.png](/t5/image/serverpage/image-id/339445i28BBEED46716AEF0/image-size/large?v=v2&px=999 "?????? ?????? 2024-08-01 ? 16.49.23.png")

pict.3

![?????? ?????? 2024-08-01 ? 16.50.44.png](/t5/image/serverpage/image-id/339446i92CACBAE16868A86/image-size/large?v=v2&px=999 "?????? ?????? 2024-08-01 ? 16.50.44.png")


Answers:
author: Bill Sheboy
body: Hi [@????? ?????](/t5/user/viewprofilepage/user-id/5535112)

Smart values are name, spacing, and case-sensitive. When an incorrect smart value is used, it evaluates to null.

The smart value for the built-in "Due Date" field is {{issue.duedate}} although there appear to be several aliases for it in Jira Cloud.

Please change to use this:

```
{{#changelog.duedate}}{{fromString}}{{/}}
```

To confirm the correct smart value (or custom field id) for a field, and if it is supported by automation rues, please use this how-to article: <https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/>

Kind regards,  
Bill

comments: author: ????? ?????
body: Hi! [@Bill Sheboy](/t5/user/viewprofilepage/user-id/1685313) I can't find field id for my custom-field "customfield_10030"

This is my [link](https://glorybet.atlassian.net/rest/api/2/issue/GAS-686?expand=names) for the issue


author: Marc - Devoteam
body: Hi [@????? ?????](/t5/user/viewprofilepage/user-id/5535112)

As [@Bill Sheboy](/t5/user/viewprofilepage/user-id/1685313) mentions, changelog is a different smart value.

As you seem to want to have the changes based on a a custom field, could you try:

```
{{changelog.customfield_10030}}{{fromString}}{{/}}
```

The ID of you custom field is customfield_10030


author: ????? ?????
body: Hi! Ive tried to use ID, but got the error of template

![?????? ?????? 2024-08-07 ? 22.12.13.png](https://community.atlassian.com/t5/image/serverpage/image-id/340654i19CC6353F7B7CBBF/image-size/large?v=v2&px=999 "?????? ?????? 2024-08-07 ? 22.12.13.png")


author: Marc - Devoteam
body: Hi [@????? ?????](/t5/user/viewprofilepage/user-id/5535112)

The smart value changelog want to use the name of the field which in your case would be: {{changelog.Due Date}}

It might be conflicting due to the fact the custom field with id 10030 has the same name as the ootb field.

Could you rename the field an test if it will work?


author: ????? ?????
body: This field is used in a large mount of project.

If I rename it, will it break the processes associated with it ?


author: Marc - Devoteam
body: Hi [@????? ?????](/t5/user/viewprofilepage/user-id/5535112)

What is associated with the field?

It will impacted filters, workflow options, automations, used in apps that are installed, like scripts, where the exact name of the field is used.

If the ID of the field is used it will all continue to work.

Could you test it in your sandbox?


author: ????? ?????
body: I don't have that yet.  
The sandbox is available in a premium plan, but I have a standard one.  
I'll try to take a trial period.

Thank you!


author: Bill Sheboy
body: Please note your expression is missing the # before changelog, and so it does not evaluate correctly.


author: ????? ?????
body: Yep

The error is missing now

but nothing happened

![?????? ?????? 2024-08-08 ? 19.04.10.png](https://community.atlassian.com/t5/image/serverpage/image-id/340781i1C31165663945708/image-size/large?v=v2&px=999 "?????? ?????? 2024-08-08 ? 19.04.10.png")


author: ????? ?????
body: I mean my field_ID is not workin

Next step - ill try to rename this field in sandbox (

![?????? ?????? 2024-08-08 ? 19.12.40.png](https://community.atlassian.com/t5/image/serverpage/image-id/340782i7AE219C036D0F209/image-size/large?v=v2&px=999 "?????? ?????? 2024-08-08 ? 19.12.40.png")


author: ????? ?????
body: Ohmy! its working!

![?????? ?????? 2024-08-08 ? 19.16.07.png](https://community.atlassian.com/t5/image/serverpage/image-id/340785i00DE9408FEE386D7/image-size/large?v=v2&px=999 "?????? ?????? 2024-08-08 ? 19.16.07.png")

Sorry for my stupidity )))


author: Marc - Devoteam
body: Hi [@????? ?????](/t5/user/viewprofilepage/user-id/5535112)

If it's a custom field and not the ootb Jira default due date field, you should use the custom field id

But I would compare the second value option against NULL or try to just leave the field empty


Tags: cloud

jira-cloud