This example shows how you can customize the field layout and other field properties in the Add Defect dialog box. You can create similar code to arrange the layout of the Defect Details dialog box.
This example illustrates a solution that customizes field properties for all user groups. You can also use the script generators to customize the layout of the Defects module dialog boxes. If you use the script generators, you must perform customization separately for each user group.
This example involves the following procedures:
SetFieldAppis a general purpose procedure that receives a field name and its properties as parameters, and assigns the properties to the field. See SetFieldApp.
SetFieldAppfor each field in the Add Defects dialog box, to set the properties of the field. For some of the fields,
FieldCust_AddDefectchecks the user group to which the current user belongs, and customizes the field properties accordingly. A call to
FieldCust_AddDefectis placed in the
Bug_Newevent procedure. See FieldCust_AddDefect.
- Rename the generated function
FieldCust_AddDefectand modify it as necessary. (Before you modify a generated script, you must rename it so that it is not overwritten the next time you run the script generator.)
- The script generator places a call to
WizardFieldCust_Addin the event procedure
Bug_New.Change this to
- The function SetFieldApp is generated when you run the script generator. You do not need to rename or modify this function.
Note: To implement this example, you can run the Add Defect Field Customization script generator and then modify the resulting scripts.