DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: B T

⟦9287852c3⟧ TextFile

    Length: 15184 (0x3b50)
    Types: TextFile
    Names: »B«

Derivation

└─⟦180fe333a⟧ Bits:30000405 8mm tape, Rational 1000, SW CATALOG, 10_20_0
└─⟦180fe333a⟧ Bits:30000537 8mm tape, Rational 1000, SW Catalog 10_20_0
    └─⟦5cb1d1d7f⟧ »DATA« 
        └─⟦3b1ee7bd8⟧ 
            └─⟦this⟧ 

TextFile

separate (Tracker.Element_Pkg)
procedure El_Modify is
    -----------------------------------------------------------------------------
    --|
    --|  NAME:  EL_MODIFY
    --|
    --|  OVERVIEW:
    --|    This procedure allows the user to modify an existing element record.
    --|    The user is prompted for an existing element record by calling
    --|    the appropriate Prompt_Pkg function.  The generic FIND is used to
    --|    get the record.  The user is then allowed to change the fields by
    --|    choosing a menu selection.  The record fields are modified directly.
    --|    If the element abbreviation is modified, MODIFY_ELEMENT_KEY is called.
    --|    If a change is made to a field that affects another data type, then
    --|    checks have to be made to insure that the change is valid.  For
    --|    example, if the person's initials are changed in the element data,
    --|    checks have to be made to make sure that the new initials belong
    --|    to a valid pre-defined person.  This is taken care of by the
    --|    Prompt_Pkg, which only returns valid values.
    --|
    --|  EXCEPTIONS HANDLED:
    --|    none
    --|
    --|  HISTORY:
    --|    written by   May Lee   March 1985
    --|    written by   Bonnie Burkhardt   March 1985
    --|
    -----------------------------------------------------------------------------
    Abort_Proc : Boolean := False;  -- don't want to change a field
    Ac_Index : Integer := 0;
    Ac_Record : Activity_Pointer;
    End_List : Boolean := False;
    El_Record : Element_Pointer;  -- pointer to element record
    El_Record2 : Element_Pointer;
    Exit_Field_Menu : Boolean := False;  -- exit element field menu
    Field_Selection : Integer;           -- selection from element field menu
    Found : Boolean;           -- parameter to find
    Key : El_Key_Type;       -- key to description of element
    -- we are looking for
    Ms_Record : Milestone_Pointer; -- to check if the milestone exists
    New_Ms : Ms_Num_Type;       -- if modify ms
    New_Pr : Pr_Init_Type;      -- if modify pr
    New_Ss_Name : Ss_Name_Type;      -- if modify ss name
    Old_Size : Integer range 0 .. 99_999 := 0;
    Pr_Key : Pr_Init_Type;      -- used to get key
    Pr_Record : Personnel_Pointer; -- to check if the person exists
    Ss_Record : Subsystem_Pointer; -- to check if the subsystem exists

    procedure Modify_Element_Key is separate;

begin
    -- get the element key
    New_Line;
    Put_Line (" Which element would you like to modify?");
    Prompt_Pkg.Existing_Ele_Key (Abort_Proc, Key);

    -- find the valid key in the list to get the pointer to that record
    Find (El_List, Key, El_Record, Found);

    if not Abort_Proc then
        -- display menu
        while not Exit_Field_Menu loop
            Field_Selection := Vt100.Print_El_Menu (El_Record);

            case Field_Selection is
                when 1 =>
                    -- get new element description
                    Put_Line (" The current element description is : ");
                    Put_Line (El_Record.Description);
                    New_Line;
                    El_Record.Description := Prompt_Pkg.Ele_Description;

                when 2 =>
                    -- Getting new element key
                    Put (" What would you like to change ");
                    Put (Key);
                    Put (" to? ");
                    Modify_Element_Key;

                when 3 =>
                    -- Getting new subsystem name
                    -- show the old name
                    Put (" The current subsystem name is ");
                    Put (El_Record.Subsystem_Name);
                    New_Line;
                    Put_Line (" What would you like to change it to? ");
                    -- get new name
                    Prompt_Pkg.Existing_Subsys_Name (Abort_Proc, New_Ss_Name);

                    if not Abort_Proc then
                        El_Record.Subsystem_Name := New_Ss_Name;
                    end if;

                when 4 =>
                    -- Getting new person's initials
                    -- show the old initials
                    if El_Record.More_Than_One_Person then
                        -- delete the element from all the personnel lists
                        for Ac in 1 .. Num_Of_Activities loop
                            Find (Pr_List, El_Record.People_Initials (Ac),
                                  Pr_Record, Found);
                            Delete (Pr_Record.Element_List,
                                    El_Record.Desc_Key, Found);
                        end loop;

                        -- prompt for the person working on each activity in the element
                        Start_Walk (Ac_List);
                        Ac_Index := 0;

                        loop
                            Walk (Ac_List, Ac_Record, End_List);
                            exit when End_List;

                            Ac_Index := Ac_Index + 1;
                            Put (" The person assigned to ");
                            Put (Ac_Record.Name);
                            Put (" is ");
                            Put (El_Record.People_Initials (Ac_Index));
                            New_Line;

                            loop
                                Prompt_Pkg.Existing_Person_Initials
                                   (Abort_Proc, Pr_Key);
                                exit when not Abort_Proc;
                                Put_Line (" You cannot abort at this point!");
                                Put_Line
                                   (" Enter the initials of a person assigned to the project.");
                            end loop;

                            El_Record.People_Initials (Ac_Index) := Pr_Key;

                            -- add the element to the person's list, if not already added
                            Find (Pr_List, Pr_Key, Pr_Record, Found);
                            Find (Pr_Record.Element_List,
                                  El_Record.Desc_Key, El_Record2, Found);

                            if not Found then
                                Add (Pr_Record.Element_List,
                                     El_Record.Desc_Key, El_Record);
                            end if;
                        end loop;
                    else
                        -- only one person is assigned
                        Put (" The current person's initials are ");
                        Put (El_Record.Person_Initials);
                        New_Line;
                        Put_Line (" Who would you like to change it to? ");
                        -- get new initials
                        Prompt_Pkg.Existing_Person_Initials
                           (Abort_Proc, New_Pr);

                        if not Abort_Proc then
                            El_Record.Person_Initials := New_Pr;
                        end if;
                    end if;

                when 5 =>
                    -- Getting new milestone number
                    -- show the old number
                    Put (" The current milestone number is ");
                    Put (El_Record.Milestone_Num, 2);
                    New_Line;
                    Put_Line (" What milestone would you like to replace it? ");
                    -- get new number
                    Prompt_Pkg.Existing_Milstone_Number (Abort_Proc, New_Ms);

                    if not Abort_Proc then
                        El_Record.Milestone_Num := New_Ms;
                    end if;

                when 6 =>
                    -- Getting new element priority
                    -- show the old number
                    Put (" The current element priority is ");
                    Put (El_Record.Priority, 2);
                    New_Line;
                    Put_Line (" What would you like to change it to? ");
                    -- get new priority
                    El_Record.Priority :=
                       Prompt_Pkg.Element_Priority
                          (Default => El_Record.Milestone_Num);

                when 7 =>
                    -- Getting new current size
                    -- show the old size
                    Put (" The current size is ");
                    Put (El_Record.Current_Size, 1);
                    New_Line;
                    Put_Line (" What would you like to change it to? ");
                    -- get new size
                    Old_Size := El_Record.Current_Size;
                    El_Record.Current_Size := Prompt_Pkg.Current_Size_Est;

                    -- if the current size estimate decreased, then the percent of work
                    -- done at start remains the same but the amount of work done at
                    -- start decreases
                    if (El_Record.Current_Size = 0) or (Old_Size = 0) then
                        El_Record.Size_Done_At_Start := 0;
                    elsif Old_Size > El_Record.Current_Size then
                        El_Record.Size_Done_At_Start :=
                           El_Record.Size_Done_At_Start *
                              El_Record.Current_Size / Old_Size;
                    end if;

                    El_Record.Date_Size_Verified := Data_Pkg.Date;

                when 8 =>
                    -- Getting new complexity
                    -- show the old complexity
                    Put (" The current complexity is ");
                    Put (El_Record.Complexity, 2, 3, 0);
                    New_Line;
                    Put_Line (" What would you like to change it to? ");
                    -- get new complexity
                    El_Record.Complexity := Prompt_Pkg.Complexity_Factor;

                when 9 =>
                    -- Getting new activity completeness
                    -- show the old activity completeness
                    Put (" The current element's activity completeness is : ");

                    for I in 1 .. Num_Of_Activities loop
                        Put (Convert (El_Record.Activity_Completeness (I)));
                    end loop;

                    New_Line;
                    Put_Line (" What would you like to change it to? ");
                    -- get new name
                    El_Record.Activity_Completeness :=
                       Prompt_Pkg.Activ_Completeness;

                when 10 =>
                    -- More than one element assigned
                    if El_Record.More_Than_One_Person then
                        -- delete the element from all the personnel lists
                        for Ac in 1 .. Num_Of_Activities loop
                            Find (Pr_List, El_Record.People_Initials (Ac),
                                  Pr_Record, Found);
                            Delete (Pr_Record.Element_List,
                                    El_Record.Desc_Key, Found);
                        end loop;

                        Single_Pr_El_Record (El_Record);
                        Put_Line
                           (" The element can now be assigned to one person.");
                        Put_Line (" Who do you want assigned to this element?");

                        loop
                            Prompt_Pkg.Existing_Person_Initials
                               (Abort_Proc, New_Pr);
                            exit when not Abort_Proc;
                            Put_Line (" You cannot abort at this point!");
                            Put_Line
                               (" Enter the initials of a person assigned to the project.");
                        end loop;

                        El_Record.Person_Initials := New_Pr;

                        -- add this element to the person's list
                        Find (Pr_List, Pr_Key, Pr_Record, Found);
                        Add (Pr_Record.Element_List,
                             El_Record.Desc_Key, El_Record);

                    else
                        -- only one person is assigned
                        -- delete the element from the personnel lists
                        Find (Pr_List, El_Record.Person_Initials,
                              Pr_Record, Found);
                        Delete (Pr_Record.Element_List,
                                El_Record.Desc_Key, Found);

                        Multiple_Pr_El_Record (El_Record);

                        -- prompt for the person working on each activity in the element
                        Put_Line
                           (" The element can now be assigned to several people.");
                        Start_Walk (Ac_List);
                        Ac_Index := 0;

                        loop
                            Walk (Ac_List, Ac_Record, End_List);
                            exit when End_List;

                            Ac_Index := Ac_Index + 1;
                            Put (" Who is assigned to ");
                            Put (Ac_Record.Name);
                            Put ('?');
                            New_Line;

                            loop
                                Prompt_Pkg.Existing_Person_Initials
                                   (Abort_Proc, Pr_Key);
                                exit when not Abort_Proc;
                                Put_Line (" You cannot abort at this point!");
                                Put_Line
                                   (" Enter the initials of a person assigned to the project.");
                            end loop;

                            El_Record.People_Initials (Ac_Index) := Pr_Key;

                            -- add the element to the person's list, if not already added
                            Find (Pr_List, Pr_Key, Pr_Record, Found);
                            Find (Pr_Record.Element_List,
                                  El_Record.Desc_Key, El_Record2, Found);

                            if not Found then
                                Add (Pr_Record.Element_List,
                                     El_Record.Desc_Key, El_Record);
                            end if;
                        end loop;
                    end if;

                    -- change the element data in the subsystem element list
                    Find (Ss_List, El_Record.Subsystem_Name, Ss_Record, Found);
                    Change_List_Data (Ss_Record.Element_List,
                                      El_Record.Desc_Key, El_Record);

                    -- change the element in the milestone element list
                    Find (Ms_List, El_Record.Milestone_Num, Ms_Record, Found);
                    Change_List_Data (Ms_Record.Element_List,
                                      El_Record.Desc_Key, El_Record);

                    -- change the element data in the element list
                    Change_List_Data (El_List, El_Record.Desc_Key, El_Record);

                when 11 =>
                    Exit_Field_Menu := True;
                when others =>
                    Put_Line ("Please enter a number between 1 and 11. ");
            end case;
        end loop;
    end if;  -- not abort_proc
end El_Modify;