Date field automation with two "if" statements not passing

martin.stoyanov
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!
August 25, 2024

Hello Attlasian community, I am facing the following problem:


In our department, we have been using the fields Start date and End date for ideas in JPD and based on them, we define a quarter for the idea. In the Start and End date fields in JPD, you can define ranges of dates, therefore I am using the End date.end and Start date. start smar values in the automation.

The problem with it is that it reads one of the if statements in reality and not the other. If I change the start date of an idea and it matches the criteria for the automation, the log says "No actions performed". If I use only one if statement either for the start date or for the end date, it works as expected. Can you please help me with that?


Screenshot 2024-08-26 085238.png

1 answer

0 votes
Gary Spross
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 26, 2024

For the date fields, I'm not sure how "greater than" & "less than" will function...

Can you share a screen capture of your "If" conditional check component?

You should have options of "is before" & "is after" that you can utilize.

Screenshot 2024-08-26 093342.png

martin.stoyanov
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!
August 26, 2024

I am using smart values and not the exact field name because it is a custom field and JPD seems to not be reading some custom fields: Screenshot 2024-08-26 154724.png

Gary Spross
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 26, 2024

Oh, yeah... A detriment of the Team-managed style project implementation of JPD.

This hurdle being the case, I think you will need to do a comparison of the 2 dates to ensure the "End date" is after the "Start date":

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/#Date-compare---

Then, you will also need to check the "months" aspect of the date values to determine which value to set as the "Quarters committed":

i.e. {{issue.Start date.month}}

You'll need to add formatting if you want the month value to be returned in a specific way.

Also, is there a reason you have ".end" & ".start" on the end of your smart values? I'm not sure that is needed.

To ensure you are retrieving values, add a "Log" component and specify the smart values you are using so you can verify the data that is being used in your checks.

Like martin.stoyanov likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events