I've added a new version of the patch to the bug page ( Below is the text of the note that I added to the bug. I'd like to get some help with my questions below. I'm trying to hang around on IRC these days too. Thanks in advance for the help.


This patch includes removal of all references to the old "display_" and "require_" values for custom fields.

Also, this patch includes a new function in admin/install.php that will migrate the existing custom field data. This new function (migrateCustomFieldDisplay()) must be called AFTER the patch has been applied to PHP files and AFTER the new field has been added to the custom_field table, but BEFORE the old fields in the custom_field table have been removed. This function is currently not called anywhere (waiting on help from thraxisp here), but I have tested it to make sure it works.

Additionally, there are some outstanding issues I am waiting for guidance on:
1) I only updated lang/string_english.txt, not any other language. Should I make the change to all files and leave the values blank?
2) I updated the API code accordingly, but currently it will return the serialized array as a string for the new field in custom_field. Not sure if that's the correct way to handle serialized data. Does the serialized array need to be unserialized and returned value-by-value? Or just as a string?
3) Do I need to do anything with admin/upgrades files? I'm not quite sure what their purpose is or how to go about creating an upgrade file for the changed schema.

- Ryan O'Leary

On 7/26/07, Ryan O'Leary <> wrote:
Hey everyone. I'm new here, first email to the group. I've released a patch for bug #5744 (
0005744: Managing custom fields in the workflow

The patch implements code that allows the display/required property of each custom field to be set according to the current status of the bug. This patch contains code that modifies the schema, the Manage Custom Field page, the update/advanced bug pages, report/advanced bug pages, and other backend code as required.

There is one glaring thing missing here, which is to completely remove all references to the current "display_report", "require_closed", etc. I didn't want to do that until there was good upgrade code available. However, I'm not sure how to approach the upgrade process. I noticed some files in admin/Upgrades, but it seems like those just modify tables. For an actual upgrade to occur with this patch, the user would have to interactively indicate which Status is equivalent to the current "report","update", "resolved", "closed" fields.

Please provide input, and any direction on how to proceed to get this code into the codebase (hopefully by 1.0.4a??).


- ryan