Subversion Repositories DevTools

Rev

Rev 2169 | Rev 2173 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2169 Rev 2171
Line 811... Line 811...
811
               }
811
               }
812
 
812
 
813
               // Re-locate requirement under its parent requirement, if such a relationship exists.
813
               // Re-locate requirement under its parent requirement, if such a relationship exists.
814
               if (ea_req != null && sub_obj.parent.isRequirement)
814
               if (ea_req != null && sub_obj.parent.isRequirement)
815
               {
815
               {
816
                  EA.Element parent_ea_req = Main.EA_Repository.GetElementByID(sub_obj.parent.ea_element_ID);
816
                  // Only do this if the parent requirement has not been orphaned
817
                  if (parent_ea_req != null)
817
                  if (sub_obj.parent.ea_element_ID != -1)
818
                  {
818
                  {
-
 
819
                     EA.Element parent_ea_req = Main.EA_Repository.GetElementByID(sub_obj.parent.ea_element_ID);
-
 
820
                     if (parent_ea_req != null)
-
 
821
                     {
819
                     ea_req.ParentID = parent_ea_req.ElementID;   // re-locate
822
                        ea_req.ParentID = parent_ea_req.ElementID;   // re-locate
820
                     ea_req.TreePos = sub_obj.treePos;
823
                        ea_req.TreePos = sub_obj.treePos;
821
                     ea_req.Update();
824
                        ea_req.Update();
-
 
825
                     }
-
 
826
                  }
-
 
827
                  else
-
 
828
                  {
-
 
829
                     // TODO: what if the parent requirement has been orphaned, but the child as represented by
-
 
830
                     // the current value of sub_obj has not been? Will that have already been taken care of by
-
 
831
                     // the code earlier in this function that re-locates existing requirements to the correct
-
 
832
                     // parent package?
822
                  }
833
                  }
823
               }
834
               }
824
 
835
 
825
               populate_latest_reqprodb_structure_package(sub_obj);   // recurse
836
               populate_latest_reqprodb_structure_package(sub_obj);   // recurse
826
            }
837
            }