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

How to do arithmetics when creating a new card

Sebastian Duda
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!
June 2, 2024

Hi,

I want to create a new card using trello's automation feature.

The title of this card should be set to "Report <X>", where <X> should be replaced by the number of weeks that have passed since a certain week (e.g., "Report 17" in week number 22).

My current approach is to set the card's title to "Report {weeknumber - 5}".

However, the calculation is not evaluated.

I did some research that arithmetics are possible for custom number fields. However, I cannot use custom fields.

Thanks in advance!

2 answers

0 votes
Lara
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 11, 2024

Hi Sebastian,

Thanks for reaching out!

To perform the calculation for the current week number, minus 5 weeks, you'll need to format the variable like so:

Report {weeknumber-5w}

You can read more about arithmetic and formatting in date variables here: https://support.atlassian.com/trello/docs/arithmetic-and-formatting-in-date-variables/

Let me know how that goes,

Lara
The Trello Team

0 votes
Hannah Humbert - Simpla Workflows
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 4, 2024

@Sebastian Duda I'm not sure I fully understand, are you wanting to input a date in the past somewhere and calculate how much time has passed since that date in weeks? Where is this date being hosted?

Sebastian Duda
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!
June 5, 2024

Technically, I'm looking for a way to calculate something like "Report <weeks since 1st of May 2024>".

However, this seems too complex. Thus, my idea was to refactor it and do a simple subtraction, i.e., "Report <weeknumber - 18>".

However, the arithmetics are not evaluated in the title and I don't understand why.

Hannah Humbert - Simpla Workflows
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 11, 2024

@Sebastian Duda it is possible to calculate the number of days, weeks, etc. between two dates in Trello, but it is a bit complex. You'll need to convert the dates to epoch so they become numerical fields. Here's an example:

when a card is added to list "Completed", set date custom field "Completion Date" to now, set custom field "Days" to "({{%Completion Date}~X} - {{%Start Date}~X}) / 86400"

Can you share the full automation you want to accomplish including the trigger?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events