Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

smart value

Ivan Andrieiev
Contributor
October 13, 2022

There is a task to calculate how much time has passed from filling one hour field to another. I'm using automation in Jira, but the field I've created isn't getting populated under the right conditions.
{{TimeCandidate}} = {{[Planned Start Date].diff([Planned End Date]).[days]}}
or the new TimeCandidate variable
and in the formula line {{[Planned start date].diff([Planned end date]).[days]}}

2 answers

2 accepted

0 votes
Answer accepted
Gaurav
Community Champion
October 17, 2022

Hello @Ivan Andrieiev 

Kindly elaborate on the new use case, enabling me to provide a better-customized solution.

--GG

Ivan Andrieiev
Contributor
October 18, 2022

@Gaurav Hi

Condition of the problem
We have a created vacancy and its creation date.
For example "job creation date"
We are creating a task in our recruitment project and will write this date in this field.
There is a vacancy closing date (vacancy closing date), it will be set only in one task before the task changes to the "Accepted" status, in tasks with a "Rejection" status, it will not be set.
I need to know how many days this vacancy has been open.

Gaurav
Community Champion
October 18, 2022

Hello @Ivan Andrieiev 

If I understand the ask, you need to know how many issues are in 'Open' status. For such issues, you can create a filter and make use of that.

Please let me know if you need help with the JQL for creating the filter.

--GG

Ivan Andrieiev
Contributor
October 19, 2022

@Gaurav 

The system is the same, I just need it to count the days not immediately, but only when another date is set.

Gaurav
Community Champion
October 20, 2022

@Ivan Andrieiev In that case, you can create a new automation rule with 'Field Value Change' as the trigger, for the required custom field and the rest of the rule the same as before.

Please let me know if that helps.

--GG

Ivan Andrieiev
Contributor
October 24, 2022

Thanks, I'll try.

Like John Funk likes this
0 votes
Answer accepted
Gaurav
Community Champion
October 13, 2022

Hello @Ivan Andrieiev 

Please try the below formula, which works for me.

{{issue.Planned start.diff(issue.Planned end).days}}

Here I am using it for the default Jira fields Planned start and Planned end.

Kindly let me know if this works or if you have any further queries.

Please accept the answer if this helps.

--GG

Ivan Andrieiev
Contributor
October 13, 2022

@Gaurav  Hi

Planned start and Planned end. Are these custom fields created?

Gaurav
Community Champion
October 13, 2022

Hello @Ivan Andrieiev 

These are not custom fields. The Planned end and Planned start are default Jira fields.

Let me know if you need help with custom fields.

—GG

Ivan Andrieiev
Contributor
October 13, 2022

In the automation settings, it says success, but I don't see the result that would count the days from the start date to the end date.

Gaurav
Community Champion
October 13, 2022

Kindly share the snapshot of the automation rule. This will enable to help you better.

—GG

Like Bill Sheboy likes this
Ivan Andrieiev
Contributor
October 14, 2022
Ivan Andrieiev
Contributor
October 14, 2022

TimeCandidate is a created customize field. 

Gaurav
Community Champion
October 14, 2022

Hello @Ivan Andrieiev 

As the field, TimeCandidate is a custom field, please take the following steps.

  1. In actions, plase slect Edit Issue
  2. Select the custom field 'TimeCandidate'
  3. Provide the formula, as required.

Below is the screenshot showing how the value of a custom field can be edited.

Kindly let me know if this works or if you have any further queries.

Please accept the answer if this helps.

--GG

Day Diff.png

Ivan Andrieiev
Contributor
October 14, 2022

@Gaurav 

So it worked thank you very much. I am very happy. There is simply a task to track how much time has passed from some customized date to the end date, and the end date is set before the task is already closed. Is it possible to count to specify dates in a different chav interval?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
atlassian, atlassian community, loom ai, atlassian loom ai, loom, atlassian ai, record recaps of meetings, meeting recaps, loom recaps, share meeting recaps,

Loom’s guide to great meetings 📹

Join us to learn how your team can stay fully engaged in meetings without worrying about writing everything down. Dive into Loom's newest feature, Loom AI for meetings, which automatically takes notes and tracks action items.

Register today!
AUG Leaders

Atlassian Community Events