Set custom date on field on a post-function transition

Matheus Tonial
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!
November 26, 2024

I made a post function to set a field date to today, but I needed to add 7 days to it, I try many different ways but none work, any suggestion on how to do it on the post function and not with automation?

I didn't find any post that would solve my problem without using the script runner

 

 

sss.png

 

 

6 answers

1 accepted

4 votes
Answer accepted
Marc - Devoteam
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.
November 26, 2024

Hi @Matheus Tonial 

Welcome to the community.

This is not an option, you will need a marketplace app, like;

  • JMWE
  • JWT
  • JSU
  • Scriptrunnner

These apps can enhance workflow options and help you with your request or use Automation for this.

1 vote
Shiva Kumar Hiremath
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.
November 26, 2024

 

Hello Matheus Tonial,

you can use the below mentioned screenshot Automation rule to edit custom date field.

 

 

 

automation to add days.PNG

1 vote
Kai Becker
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 26, 2024

@Matheus Tonial welcome to the community and thank you for your question.

I would recommend using an Automation Rule to set the date with the appropriate timestamp. This does not require an app at all.

Documentation on working with dates in Smart Values: https://support.atlassian.com/cloud-automation/docs/examples-of-using-smart-values-with-dates/#Calculating-business-days

 

0 votes
Shiva Kumar Hiremath
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.
November 26, 2024

Hello Matheus Tonial,

you can use the below mentioned screenshot Automation rule to edit custom date field.automation to add days.PNG

0 votes
Dick
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.
November 26, 2024

Hi all,
A very similar question has been asked previously in this community:
How can I set a custom field date one week *before...

I'm hesitant to say that Google is my friend, but here it helped...

Dick

Marc - Devoteam
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.
November 26, 2024

Hi @Dick 

You mentioned article relates to Trello and not JIra.

Dick
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.
November 26, 2024

Hi @Marc - Devoteam,

It's the line of thought in the article and the use of smart values (kindly mentioned by @Kai Becker as well) that are very similar to the problem described here. 

 

There's more than one road leading to Rome

:)

Dick

Marc - Devoteam
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.
November 26, 2024

Hi @Dick 

Yes in a way, but it can confuse people as all information in the article and related screenshots with configuration don't exist in Jira.

Hence this cold cause new questions from a user on options that don't exist in JIra

:)

0 votes
Nacho Moreno Ortega
Contributor
November 26, 2024

Hello Matheus Tonial,

I am Nacho and i am part of the Decadis team.

As @Marc - Devoteam mentioned, it can be done with our app Jira Workflow Toolbox for Jira Cloud.

For this purpose, the Update fields post function can be created combined with the parser function addDays() to add 7 days.

Here is the expression that can be used:

%{addDays({system.currentDateTime}, 7, RUN_AS_LOCAL)}

And two screenshot of the post function configuration:

img2.pngimg3.png

If you need more information, please feel free to create a ticket on our support portal.

Best regards,

Nacho

Suggest an answer

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

Atlassian Community Events