Um... okay.
So I dug into the code of bug_report_page.php, and have discovered that basically
nothing gets done with any custom field that the reporting user doesn't have 'rw' access to. Such fields are not included in the form (not even as hidden fields) and so there's no trace of them in the POST of that form to bug_report.php.
Even if somehow such a field
did get included among the POST variables, there's code in bug_report.php that prevents setting the field's value --
even to the defined default value -- if the reporting user doesn't have write access to the field.
Does this behavior strike anyone other than me as wrong?
It seems to me that a field should be initialized to its default value if no alternative value was provided, regardless of whether the reporting user
failed to provide a value or
was prohibited from providing a value. If a default value is defined, the field certainly shouldn't be left "floating," with
no value, should it?
In my opinion, a more reasonable behavior for restricted-access custom fields in a bug report would be:
- for users with read access but no write access, to display the field pre-set to its default value and with the input control disabled, and to write that default value to the database on submit;
- for users with neither read nor write access, to include the field as a "hidden" input pre-set to the default value, and again, to write that default value to the database on submit.
Comments? Contrary opinions? Should I file a change request?