Update date based on the service request date

Eric Silva
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 25, 2024

Eu tenho um campo personalizado de data que se chama "Data de Vencimento".

Se trata de um campo que eu irei adicionar na fila dos meus chamados, porém, eu gostaria de fazer uma automação que preenchesse esse campo automaticamente seguindo essa linha de raciocínio:

"SE" o dia da Solicitação estiver entre Dia 03 e Dia 25, então eu quero que ele pegue o ultimo dia do mês da solicitação e adicione mais dois dias e preencha o campo com essa data.

"SE-NÃO" Quero que ele jogue o pagamento para daqui "Dia da solicitação" + 30 Dias.

 

I have a custom date field called "Due Date".

This is a field that I will add to the queue of my requests, however, I would like to create an automation that fills this field automatically following this reasoning:

"IF" the request date is between the 3rd and the 25th of the month, then I want it to take the last day of the request month, add two more days, and fill the field with this date.

"ELSE" I want it to set the due date to "Request Date" + 30 Days.

1 answer

0 votes
Tommaso Gionfriddo _Teklada_
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.
June 25, 2024

Hi @Eric Silva , welcome to the community!

To achieve this, use the following structure

  1. Trigger: Issue Created
  2. Condition: If Else
    1. If {{issue.created.format(“dd”)}} is greater than 2 and {{issue.created.format(“dd”)}} is less than 26 (or 3 and 25 if your range is not inclusive)
      1. Action: Edit issue
        Due Date: {{now.endOfMonth.plusDays(2)}}
    2. Else:
      1. Action: Edit issue
        Due Date: {{now.plusDays(30)}}

 Screenshot 2024-06-25 at 20.29.21.png

I haven't had a chance to test this, so please let me know if the smart values don't quite work and I'll review full.

I would recommend reviewing the date smart value documentation

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events