LP#
1715697 Refactor empty volume adding
The new ability to add empty volumes was causing the existing
ability to add new volume/copy combos to not work as expected.
More specifically, added volume/copy combos would not generate
in the selected org_unit, but always in the ws_ou.
To correct this, this change refactors/reverts significant portions of
920f585052ef809ea6ca1e447d416ada871b467c. Reasons include:
- Existing code distinguishs 'adds' from 'edits' via two wrappers,
spawnHoldingsAdd and spawnHoldingsEdit. With this commit, empty volume
adding now extends the 'add' function rather than the 'edit' one, as
this seems more intuitive.
- The previous change had extended both the catalog app and another
similar directive which is only used in a merging context. Since the
merge context had no ability to add anything, and the new code was not
wired up to the interface, this has simply been removed (for now).
- The volcopy app is set up around the concept of passed in
'prototype' vol/copy objects of varying degrees of completeness. It
then loops over these to generate the interface. The previous code
extended this setup with a loop over a potential 'owners' array to
generate empty volumes, but this unrelated loop within a loop seemed
counterintuitive (and was the source of the original bug). This change
has been removed, and empty volume creation now hews more closely to
the original model.
While this commit appears large, when viewed in the context of the
pre-
920f58505 code, it is quite limited in scope.
Signed-off-by: Dan Wells <dbw2@calvin.edu>
Signed-off-by: Mike Rylander <mrylander@gmail.com>