Comment #4 on issue 563 by vangarderen.peter: Default repository setting leads to extra repository links for each lower level http://code.google.com/p/qubit-toolkit/issues/detail?id=563
The problem is that we don't want to hard-code the top-level of the hierarchy. It could be 'fonds', 'collection', 'series' or any other level that the administrator decides to add, e.g. 'record group'. We also want to leave the user with the option to assign some archival materials from the same fonds to different repositories (i.e. the papers of one author or the records of one organization may be stored in different repositories but would still be described at a logical level as one set of papers/records). We could try to do an elaborate validation rule on repository_id field which checks to see if the record that is currently being created has an ancestor with the same repository_id and, if so, resets any default repository value to null. However, this would have to be done before the form submit, requiring some fancy javascript which means it would not work in browsers where javascript is disabled. It is also getting much too complicated. The only viable option I see is to do a check in the update action where you would use the parent_id request parameter value to instantiate the parent object, then loop over its ancestors to see if the repository has already been set to the same value, if so, we tell the update action to ignore the repository_id value for that submit. However, I am starting to wonder whether the default repository feature is worth the trouble. If we are only expecting the user to select a repository for the top-level of a descriptive hierarchy it is actually not so repetitive that it requires to be populated with a default value. As a matter of fact, in more cases than not, for each lower level the user should be leaving the repository value blank, the default should be null, as it was originally. -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Qubit Toolkit Issues" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/qubit-issues?hl=en -~----------~----~----~----~------~----~------~--~---
