This is a summary of how things work now and the perceived bugs.
Fields with a required setting get a visibility value of 3.
Field with a show setting get a visibility value of 2.
Field with a suggested setting get a visibility value of 1.
Other fields get a visibility value from either the default visibility map or a visibility of 0 if the field is not present in the map. For fields listed in the default visibility map, a show, required, or suggested organizational unit setting will override the default value.
Showing "Required Fields" shows fields with visibility of 2 or higher.
Showing "Suggested Fields" shows fields with visibility of 1 or higher.
Showing "All Fields" shows fields with a visibility of 0 or higher.
Fields with a show or required setting always show. Fields with a suggested setting show when showing suggested fields or all fields. Other fields without a default visibility map entry only show when showing all fields.
(The difference between show and required settings is that the input boxes for required fields are highlighted, and the interface will not save unless they are filled in.)
The ui.patron.edit.default_suggested setting makes "Suggested Fields" the default view level in the interface.
The above flow is sound and workable. However, there are some bugs.
1. The required, suggested, and show settings all take a true/false value. Setting the value to false does nothing. Thus, there is no way to completely hide a nonessential field.
2. The interface looks up a limited number of settings. Adding a setting for a field that is not hard-coded into the settings look up in the interface does not affect the field's visibility.
3. There are a limited number of settings available with the stock installation, and as mentioned previously adding new ones has no effect on the interface.
4. The values in the default visibility map for some fields are likely too high.
If anyone thinks I have missed something in the above description, please feel free to add a comment. I am posting this to look for feedback.
Number 1 is solved by a.bellenir's patch on this bug for those fields that have show settings to look up.
Number 2 and 3 can be solved by adding new settings to the database and expanding the list of setting retrieved in the interface. (It may become cost prohibitive to look up each field as it is referenced, so we are likely stuck with an ever-expanding hard-coded list of settings until someone comes up with a better solution.)
I propose fixing number 4 by setting most of the fields in the default visibility list that have a value of 2 (show) to have a value of 1 (suggested).
There are some fields that MUST be required. These fields are required by the database in order to store a minimal amount of patron data. We could possibly add some safeguards for these fields against someone adding a show setting and making the value false.
This is a summary of how things work now and the perceived bugs.
Fields with a required setting get a visibility value of 3.
Field with a show setting get a visibility value of 2.
Field with a suggested setting get a visibility value of 1.
Other fields get a visibility value from either the default visibility map or a visibility of 0 if the field is not present in the map. For fields listed in the default visibility map, a show, required, or suggested organizational unit setting will override the default value.
Showing "Required Fields" shows fields with visibility of 2 or higher.
Showing "Suggested Fields" shows fields with visibility of 1 or higher.
Showing "All Fields" shows fields with a visibility of 0 or higher.
Fields with a show or required setting always show. Fields with a suggested setting show when showing suggested fields or all fields. Other fields without a default visibility map entry only show when showing all fields.
(The difference between show and required settings is that the input boxes for required fields are highlighted, and the interface will not save unless they are filled in.)
The ui.patron. edit.default_ suggested setting makes "Suggested Fields" the default view level in the interface.
The above flow is sound and workable. However, there are some bugs.
1. The required, suggested, and show settings all take a true/false value. Setting the value to false does nothing. Thus, there is no way to completely hide a nonessential field.
2. The interface looks up a limited number of settings. Adding a setting for a field that is not hard-coded into the settings look up in the interface does not affect the field's visibility.
3. There are a limited number of settings available with the stock installation, and as mentioned previously adding new ones has no effect on the interface.
4. The values in the default visibility map for some fields are likely too high.
If anyone thinks I have missed something in the above description, please feel free to add a comment. I am posting this to look for feedback.
Number 1 is solved by a.bellenir's patch on this bug for those fields that have show settings to look up.
Number 2 and 3 can be solved by adding new settings to the database and expanding the list of setting retrieved in the interface. (It may become cost prohibitive to look up each field as it is referenced, so we are likely stuck with an ever-expanding hard-coded list of settings until someone comes up with a better solution.)
I propose fixing number 4 by setting most of the fields in the default visibility list that have a value of 2 (show) to have a value of 1 (suggested).
There are some fields that MUST be required. These fields are required by the database in order to store a minimal amount of patron data. We could possibly add some safeguards for these fields against someone adding a show setting and making the value false.