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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,556,266
Community Members
 
Community Events
184
Community Groups

Date and time functions

Is it possible to use a variable or a custom field when formatting the date, e.g. 

{{now().plusHours({{"customfield_10286"}})

2 answers

Instead of a constant value in the plusHours () function I need to be able to use a variable from a field such as a numeric or a drop-down list, that's all.
If possible, please give me an example and syntax.
While browsing this thread, I have doubts if it is possible here 

0 votes
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 28, 2021

Calling the expert - @Bill Sheboy 

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.
May 28, 2021 • edited

Hi @Kamil Blicharski and @John Funk 

I note you are trying to nest the smart values and wrap a number with quotation marks, which could be part of the issue.  Depending upon your custom field type, maybe try this:

{{now().plusHours(issue.customfield_10286.asNumber())}}

If that does not help, what problem are you trying to solve?  Knowing that may reveal alternative solutions.

Best regards,

Bill

Like John Funk likes this
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 31, 2021

Hi Kamil - please make your responses in the same thread here so that future readers can follow the conversation.

Did you try the syntax provided by Bill above? 

Instead of a constant value in the plusHours () function I need to be able to use a variable from a field such as a numeric or a drop-down list, that's all.
If possible, please give me an example and syntax.
While browsing this thread, I have doubts if it is possible here 

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.
Jun 01, 2021

Hi @Kamil Blicharski 

With automation rules, it is not yet possible to use a created variable as a parameter to a function.  If you just need to use a field from the issue, that does work.  Please see the example I provided.

Like # people like this

Would it be possible to use the syntax the other way around? So instead of using now to solve a math expression, I would would want to use a custom field as input.

 

Example: {{issue.customfield_100xx.minusBusinessDays(3)}}

 

In which my custom field would represent a delivery date (arrival at customer) and the output would be my due date (departure for transport).

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Mar 08, 2022

@Yannick Roethof  - Welcome to the Atlassian Community!

Sure, you can do that. 

Like Yannick Roethof likes this

Suggest an answer

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

Atlassian Community Events