Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Use changelog in smartvalue automation

Игорь Титов
Contributor
August 1, 2024

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

 

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

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

pict.3

Снимок экрана 2024-08-01 в 16.50.44.png

 

2 answers

1 accepted

0 votes
Answer accepted
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.
August 1, 2024

Hi @Игорь Титов 

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

Игорь Титов
Contributor
August 7, 2024

Hi! @Bill Sheboy I can't find field id for my custom-field "customfield_10030"

This is my link for the issue

 

Marc - Devoteam
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.
August 7, 2024

Hi @Игорь Титов 

As @Bill Sheboy 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 

Игорь Титов
Contributor
August 7, 2024

Hi! Ive tried to use ID, but got the error of template 

Снимок экрана 2024-08-07 в 22.12.13.png

Marc - Devoteam
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.
August 8, 2024

Hi @Игорь Титов 

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?

Игорь Титов
Contributor
August 8, 2024

This field is used in a large mount of project.

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

Marc - Devoteam
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.
August 8, 2024

Hi @Игорь Титов 

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?

Игорь Титов
Contributor
August 8, 2024

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!

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.
August 8, 2024

Please note your expression is missing the # before changelog, and so it does not evaluate correctly.

 

Игорь Титов
Contributor
August 8, 2024

Yep

The error is missing now

but nothing happened

Снимок экрана 2024-08-08 в 19.04.10.png

 

 

 

Игорь Титов
Contributor
August 8, 2024

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

Игорь Титов
Contributor
August 8, 2024

Ohmy! its working! 

Снимок экрана 2024-08-08 в 19.16.07.png

Sorry for my stupidity )))

Like Marc - Devoteam likes this
0 votes
Marc - Devoteam
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.
August 1, 2024

Hi @Игорь Титов 

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

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events