Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7163861
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:58:25+00:00 2026-05-28T13:58:25+00:00

I will try to explain this the best way I can, but feel free

  • 0

I will try to explain this the best way I can, but feel free to ask for clarifications.

First, I will try to explain the problem.

I need to calculated the number of resource cost (points) for any given iteration.That being said, picture an excel document. The left-most column has a list of releases, or projects that are needing to completed. On the top row, the column headers are iterations.

I have the following information. I have the number of resources needed for each individual release. But, since a release can span multiple iterations, I need a way of splitting those resources required fairly over each iteration.

E.g. A release may begin one day before the next iteration, so I must allot only a small percentage of resource to that release/iteration combination.

I have included in an image what I have so far. For some reason, I cannot properly calculate the right amount, most likely due to my poor math skills. I hope this is trivial for one of you, and am thanking for any attempts.

This is my first attempt at javascript so feel free to throw in any suggestions as well.

What I have now is roughly this.

for (var i = 0; i < results.Iterations.length; i++) {
var iteration = results.Iterations[i];
for (var z = 0; z < results.Releases.length; z++) {
    var release = results.Releases[z];
    release[iteration.Name] = release[iteration.Name] || 0;

    if (dates.inRange(iteration.StartDate, release.ReleaseStartDate, release.ReleaseDate) 
    || dates.inRange(iteration.EndDate, release.ReleaseStartDate, release.ReleaseDate))
    {
       var availableReleaseDays = dates.workingDaysBetweenDates(release.ReleaseStartDate, release.ReleaseDate);
       var availableIterationDays = dates.workingDaysBetweenDates(iteration.StartDate, iteration.EndDate);
       var iterations = calculateIterations(release, results.Iterations, dates);
       var resources = Math.round(release.Resources/iterations );

       release[iteration.Name] += resources;
    }

}

Current View

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T13:58:26+00:00Added an answer on May 28, 2026 at 1:58 pm

    I’ve worked up code that does what I think you are asking. It’s in this gist.

    The basic idea is that for each release, I divided all of it’s resources over all of the work days between its start and end. I then walk through each day and if that day is in an iteration, I add those resources to that iteration. Is that what you are trying to do?

    The former Agile Coach in me wants to question the approach. It feels like a bit too much long range planning with a level of precision in the calculations that exceeds the resource estimate accuracy… but I’ve held back those instincts enough to give you usable code.

    It’s probably overkill for this situation but the solution uses a library I’m working on called ChartTime. ChartTime allows you to do date and timebox manipulation and calculations. It has the ability to knockout holidays and weekends, which I’ve used in my example solution to your problem even though that precision wasn’t needed. It also has timezone precision, which I did not use.

    ChartTime is written in CoffeeScript and my solution to your problem is also written in CoffeeScript. CoffeeScript is just a cleaner syntax for JavaScript and it compiles to JavaScript so you can use the ChartTime library directly from JavaScript. I’m working on it every weekend/evening and it works well. The docs are pretty good but not complete yet.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I will try and explain this the best way I can. I have a
I'm going to try to explain this best I can I will provide more
Alright, Ill try to explain this as best as I can first... My program
I am having difficulty to explain this problem, but I will try anyway. I
Hi I will try explain this as best I can. I am using a
I'll try to explain this as best as i can, but i appologize if
It's kinda hard to explain, but I will try my best. I have this
This problem is a little different, so I will try my best to explain
I will try to explain this the best I can. I created a CMS
I will to try to explain this as best as I can. I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.