Skip to content

ItEr76S26RemoveExternalCodeFromTemplates

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

TWiki> LibrePlan Web>ItEr76S26RemoveExternalCodeFromTemplates (20 Aug 2012, ManuelRego)EditAttach

Story summary Remove external code from templates
Iteration ItEr76Week01To33
FEA ItEr76S26RemoveExternalCodeFromTemplates
Story Lead  
Next Story  
Passed acceptance test No

Acceptance Criteria

Additional Specification Comments

Implementation Notes

The task has a bit more of of work than expected, because there is a problem in the model: the class OrderElement receives the code element from two classes: its parent class IntegrationEntity and the related class InfoComponent. See diagram:

ItEr76S26RemoveExternalCodeFromTemplates.png

My solution will be removing the code attribute from InfoComponent class. It requires some changes in the hbm definitions of the involved classes.

-- JacoboAragunde - 28 Apr 2012

It looks like the solution proposed above is invalid. The code attribute is part of InfoComponent class for a good reason: it's needed in the copy mechanism, happening when elements in the WBS are indented, and also when templates are created from OrderElement objects. The second case is not important any more, but the first one is.

The solution proposed now is leaving OrderElement class as it is, and just ignore the code attribute in OrderElementTemplate. It will be part of the object but it won't appear in the interface nor will be saved to the DB.

-- JacoboAragunde - 28 Apr 2012 (later)

After I had taken over other tasks, I found a regression related to this. You cannot edit and save an existing template containing some tasks. The message says "code not specified".

Why is this happening? Because, before saving, LibrePlanClassValidator checks every field with annotations for every object being saved, and in the case of OrderElementTemplates, InfoComponent.getCode() still exists and has a @NotEmpty annotation. Some more work on this topic is needed...

-- JacoboAragunde - 02 May 2012

Proposed implementation of the solution:

ItEr76S26RemoveExternalCodeFromTemplates-solution.png

-- JacoboAragunde - 03 May 2012

 

Delay Causes

Final or Pending Considerations

Task completed. TODO: template finders still have a 'code' column (the finder is reused for OrderElements too) (see commit 47ccb4d2576512bfb392520b84828312d577a842). We have to remove that column, maybe refactoring the code of the finder.

-- JacoboAragunde - 28 Apr 2012

Fixed regression using the solution exposed in the class diagram above.

-- JacoboAragunde - 03 May 2012

 

Commits

%RPSHOWGITCOMMITS%

Tasks in this story

Tasks Est Spent To do Risk Reviewer Developer Task Name Start Date Est End Date End Date
Task 3 4 0 Low ManuelRego JacoboAragunde Remove the code attribute from templates (interface and entity)      

Total Hours in this Story

User Spent in XpTracker Spent in phpReport Ok?
JacoboAragunde 4 0 ALERT!
Total 4 0 ALERT!

Attachments Attachments

I Attachment Action Size Date Who Comment
pngpng ItEr76S26RemoveExternalCodeFromTemplates-solution.png manage 15.4 K 03 May 2012 - 08:11 JacoboAragunde Diagram with involved classes and proposed solution (png).
elsedia ItEr76S26RemoveExternalCodeFromTemplates.dia manage 2.2 K 03 May 2012 - 08:10 JacoboAragunde Diagram with involved classes and proposed solution
pngpng ItEr76S26RemoveExternalCodeFromTemplates.png manage 12.6 K 28 Apr 2012 - 10:40 JacoboAragunde Diagram with involved classes (png).

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

Clone this wiki locally