Variables
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":
{{#newDate.toDate}}func=plusDays({{myNumber}}){{/}}
returns: "2021-04-05T00:00:00.0+0000"
Why can I not do the same with the "ofTheMonth":
{{#newDate.toDate}}func=ofTheMonth({{myN.asNumber}},{{myDay.asNumber}}){{/}}
returns: "2021-04-01T00:00:00.0+0000"
If I log just the inside portion (func=ofTheMonth({{myN.asNumber}},{{myDay.asNumber}})) I get:
func=ofTheMonth(1,1)
My understanding is that created variables do not work as parameters to functions yet:
https://codebarrel.atlassian.net/browse/AUT-2022
What problem are you trying to solve? Knowing that may help the community suggest other ways of getting the result with automation.
Best regards,
Bill
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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: https://support.atlassian.com/contact/#/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
So back to my original question, why do some functions work with the "func" statement, while others do not?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Maybe it's only ".OfTheMonth" that is not working with a "func" statement, most of the other date functions work fine.
https://support.atlassian.com/jira-software-cloud/docs/smart-values-date-and-time-functions/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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: https://codebarrel.atlassian.net/browse/AUT-1791
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have already created a work around using 5 separate variables. thanks for looking!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.