mythmon / edwin

A bug management system
Mozilla Public License 2.0
4 stars 0 forks source link

Show blocker bugs #19

Closed mythmon closed 9 years ago

mythmon commented 9 years ago

When a bug is blocked by another bug, that should be shown in the UI.

willkg commented 9 years ago

I'll work on this next. I'm skimming the code and I'm not sure how to approach this.

In Ernest, what we did is:

  1. fetch all the open bugs for the sprint
  2. build a list of all bug ids for bugs that block those bugs
  3. figure out the list of blocker bugs that we don't already have data for
  4. fetch that list of bugs to get the resolution
  5. go through all the open bugs for the sprint and figure out which bugs listed in the depends field are still open--this is the list of open bugs that block that bug

In Edwin, the BugStore handles SET_RAW_BUGS and goes through and augments all the bugs with information. We need to do another fetch for bugs, so I think that requires another action.

So I think we should do something like:

  1. Timeline.js calls loadBugs that does a fetch and then creates a SET_RAW_BUGS action
  2. BugStore handles SET_RAW_BUGS and augments all the bugs it just got
  3. Timeline.js calls loadBlockerBugs which somehow gets the list of bugs from the BugStore, figures out the list of blocker bugs and does a fetch for the resolution for those blocker bugs
  4. BugStore handles a SET_BLOCKER_BUGS_STATUS and augments all the bugs with the status of blockers

Does that sound like a good plan?

mythmon commented 9 years ago

That does sound like a good plan. It doesn't exactly vibe with the long term plans I had for the BugStore, but I shouldn't block useful work on things like that.

The "somehow gets the list of bugs from the BugStore" part you mentioned would probably just be BugStore.getBugs() or whatever the method is. It is fine for the actionCreators to call the public methods of the BugStore.