Auto populate field based on values from previous field

Mohamad Hamizan bin Mohamad Salihin
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!
April 24, 2024

I have 3 fields in my Request Form: -

  1. Start Date (Date picker)
  2. End Date (Date picker)
  3. Total Leave Days (Number field)

The request will be made in the portal and the scenario is as follows: -

  1. User pick Start Date
  2. User pick End Date
  3. Total Leave Days field will be auto-populated with the difference of Start Date and End Date in days.

This scenario is supposed to be happening before the user submit the request. 

Below is my current automation rule for reference. The trigger i've chosen is "Issue created" which makes the rule to run only after a user has submitted a request. What i intended to do is for the Total Leave Days to be auto-populated WHILE the user is filling in the form within the portal. Is it possible to implement in automation? If it isn't, is there any workaround for this?

 

Thanks.

image.png

1 answer

1 accepted

0 votes
Answer accepted
Jenny Severin
Contributor
April 24, 2024

Try entering this into the Total Leave Days:

{{issue.Start Date.diff(issue.End Date).days}}

Total Leave Days.jpg

Mohamad Hamizan bin Mohamad Salihin
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!
April 24, 2024

Thank your for your response, @Jenny Severin

 

Yep. That is what I did in the Total Leave Days. It works just fine but only after the request has been submitted since I chose the "Issue created" trigger.

 

Just my concern is that whether this can be done while the request is being made in the portal. Perhaps a different trigger than the "Issue created" or any other workaround?

Jenny Severin
Contributor
April 25, 2024

Sorry, but I do not believe it is possible to have the Total Leave Days field dynamically updated during portal entry.   

Suggest an answer

Log in or Sign up to answer