Skip to content

ItEr74S07WBSTreeRefactoring

Jeroen Baten edited this page Mar 9, 2018 · 1 revision

TWiki> LibrePlan Web>ItEr74S07WBSTreeRefactoring (19 Jun 2011, ManuelRego)EditAttach

Story summary WBS tree refactoring
Iteration ItEr74week14To24
FEA ItEr74S07WBSTreeRefactoring
Story Lead  
Next Story  
Passed acceptance test No

Acceptance Criteria

Additional Specification Comments

Implementation Notes

Created a new test class called OrderElementTreeModelTest with tests for basic operations:

  • Add element
  • Remove element
  • Add advances on element
  • Add criteria on element

OrderElementTreeModel extends EntitiesTree (in the webapp module), and defines a method added which is called after some element is added to the tree. The implementation for this method calls to updateCriterionRequirementsInHierarchy method which finally calls to OrderElement::updateCriterionRequirements (in business).

Which means that OrderElementTreeModel is taking care of some business logic and it shouldn't. So, method EntitiesTree::added is removed. We need to still keep calling to OrderElement::updateCriterionRequirements at some point, but in the business module (that should be in charge of this logic).

In the business part there're an interface called ITreeParentNode implemented by TreeNodeOnList (with all the basic behaviour for operations) and defining some abstract methods onChildAdded and onChildRevomed. TreeNodeOnList is extended by TreeNodeOnListWithSchedulingState (in charge of keep scheduling state with proper values) which defines a method onChildRevomedAditionalActions. This method is overridden at ChildrenManipulator class inside OrderLineGroup.

Then I added a new onChildAddedAditionalActions in TreeNodeOnListWithSchedulingState to take care of update criteria.

All the business logic related with entities used in OrderElement (like criteria, advances, ...) when some element is added or removed should be controlled by these 2 methods in ChildrenManipulator:

  • onChildAddedAditionalActions
  • onChildRemovedAditionalActions

-- ManuelRego - 19 Apr 2011

We will need to do some refactorization to use the same methods in all the cases. Moreover, templates part is broken as it has a particular implementation that should be reused when possible.

For the moment I've been adding more and more tests to OrderElementTreeModelTest and patching current implementation to make it works.

-- ManuelRego - 04 May 2011

 

Delay Causes

Final or Pending Considerations

 

Commits

%RPSHOWGITCOMMITS%

Tasks in this story

Tasks Est Spent To do Risk Reviewer Developer Task Name Start Date Est End Date End Date
Task 20 42.75 0 Low JavierMoran ManuelRego Do the tests and implement things in order to satisfy operations      

Total Hours in this Story

User Spent in XpTracker Spent in phpReport Ok?
ManuelRego 42.75 0 ALERT!
Total 42.75 0 ALERT!

Copyright (c) by the contributing authors. All material on this collaboration platform is the property of the contributing authors.

Clone this wiki locally