Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Can I use a structure formula name in the formula itself? Edited

I want to have a column in a structure that calculates the amount of work for a given task that will fall in a given time period. 

For instance, if I have a task that has 15 story points and starts on June 7 and ends on June  25 (3 weeks) I want it to calculate that the task has 5 story point for the weeks of June 7, June 14, June 21.

I can do this with the following formula:

 

if(days_between(startdate,duedate) > 0;
ftedays*if(duedate > 0;
max(0,7-max(0,days_between(date("Jun 21, 2021"),startdate)) -
max(0,days_between(duedate,date("Jun 27, 2021")))))/days_between(startdate,duedate)/7)

 

This gives me exactly what I need, but I need to change the formula for each column to change the dates.  Can Jira read the dates "Jun 21, 2021" and "Jun 27, 2021" from somewhere, perhaps the formula name, so I don't need to change the formula for each column manually?

(`ftedays` above is just a renaming of Story Points)

Thanks,

Luke

1 answer

Hi, @Luke Fraser.  You can :)     

You’ll create a variable that you reference in the formula, that itself is another formula.

To do this, you'd write your formula as usual, referencing this variable (not yet defined).

When you get prompted for the variable definition, you scroll down the list of options to formula and a new editor will open in the same window. You can write another formula there.

Give it a shot and let us know how you make out. 

-dave [ALM Works]

I'm not clear what you are recommending here.  In my original formula I want the dates "Jun 21, 2021" and "Jun 27, 2021" to be replaced by some variable whose value would change based on which column I'm in. 

I'm clear on how to have variable values change as rows change, that's the usual way of doing things.  What I want is to have a formula like the one below, where _period_start_ and _period_end_ have values that change as I move from column to column. 

if(days_between(startdate,duedate) > 0;
ftedays*if(duedate > 0;
max(0,7-max(0,days_between(date(_period_start_),startdate)) -
max(0,days_between(duedate,date(_period_end_)))))/days_between(startdate,duedate)/7)

 Are you suggesting I can do that, and I'm missing it?

My apologies, @Luke Fraser. I misunderstood. 

I guess I'm struggling a bit with "as I move from column to column." Let me ask one of my colleagues to have a look at this thread.

-dave 

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you