Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

date smart value function ofTheMonth not working inside function


newDate is set to "2021-04-01"

myNumber is set to "4"

myN is set to "1"

myDay is set to "1"


Here is what is working "plusDays":


returns: "2021-04-05T00:00:00.0+0000"


Why can I not do the same with the "ofTheMonth":


returns: "2021-04-01T00:00:00.0+0000"

If I log just the inside portion (func=ofTheMonth({{myN.asNumber}},{{myDay.asNumber}})) I get:



1 answer

Hi @Garrett McCreery 

My understanding is that created variables do not work as parameters to functions yet:

What problem are you trying to solve?  Knowing that may help the community suggest other ways of getting the result with automation.

Best regards,


created variables has nothing to do with my issue. What I am asking is why some functions like "plusDays" works, but "ofTheMonth" does not in my examples above.

Garrett, would you please post an image of your complete automation rule?  That may provide context as you note you are not using created variables and yet you seem to be using variables in the function calls.

If posting the image is not possible, I suggest working with your site admin to submit a defect to customer support for their assistance:

I'm not saying that I am not using created variables, I'm saying that they have nothing to do with my issue... 

1. Here is the function "plusDays" being used in a "func" statement and it works fine:





Here is the function "ofTheMonth" where I am trying to use it in a "func" statement and it is not working. You will see that the function does work, it's just not working with a "func" statement. 



Untitled 2.png


So back to my original question, why do some functions work with the "func" statement, while others do not?

Maybe it's only ".OfTheMonth" that is not working with a "func" statement, most of the other date functions work fine.

Honestly, I have no idea why that function is different.  And I am still surprised you are getting results with created variables as function parameters.

The only open defect I saw for func() and date functions is a problem interpreting string fields as numeric values:

If you have a specific need for a day of week, you might try working around with withNextDayOfWeek() and plus/minus the date.  I have done that to build calendar tables with automation in the Description.

I have already created a work around using 5 separate variables. thanks for looking!

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Jira

Admins, notify your Jira instance of system-wide changes with the new admin announcement banner

Hi All! We’re excited to share the launch of an announcement banner that lets Jira site administrators communicate directly to their users across their  Jira Cloud instance.  ...

638 views 16 18
Read article

Community Events

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

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you