Professional Documents
Culture Documents
SCM490 - 06 - ClearQuest Customization - Fields and Forms
SCM490 - 06 - ClearQuest Customization - Fields and Forms
Objectives
In this Lab, you will have the chance to experience the flexibility of schema
customization in Rational ® ClearQuest® without resorting to scripting.
Here are the tasks that you will perform:
Add a new field that is required for every defect submission.
Add a parent/child control to allow users to link defect records.
Create a record family type that has Defect and EnhancementRequest as its
members.
Run a multi-record type query.
1. Create a new field for Defect record type, and name it user_number.
3. Add the new field user_number to both the Submit form and the Record form of
Defect record type.
6. Upgrade the user database my_db with the new schema version.
The following set of steps is one of the ways to approach the above tasks. You can use
these steps to accomplish the tasks listed in this exercise, or create your own. TASK 1 –
Create a new field for Defect record type, and name it “user_number.”
1. Click Start > Programs > Rational ClearQuest > Rational ClearQuest
Designer.
3. In the ClearQuest Designer Login dialog box, type “admin” as the user name,
and leave the Password field blank. Click OK.
4. Select my_schema in the Open Schema Wizard. (Note that the latest version is
version 3.) Click Next.
5. In the Comment field, type “Add a new field called user_number.” Click Finish.
8. Double-click Fields. The ClearQuest Designer displays the Fields table in the right
pane.
a. On the General tab, type “user_number” in the Field Name field. Select
INT in the Type field.
b. On the Help Text tab, type “This field contains your user number. It
has to be an integer.”
12. In the Workspace, click Record Types > Defect > States and Actions.
13. Double-click Behaviors. ClearQuest Designer displays the Behaviors table in the
right pane.
14. In the Behaviors table, find the user_number field. In the Submitted state column,
it should be OPTIONAL.
15. Right-click the cell, and select MANDATORY. The behavior of user_number
field in the Submitted state is now MANDATORY.
TASK 3 – Add the new field “user_number” to both the Submit form and the
Record form of Defect record type.
17.In the Workspace, click Record Types > Defect > Forms. There are two items:
Defect_Base_Submit and Defect_Base.
18.Double-click the Defect_Base_Submit form. Beside the form layout, three items
appear: Form Tool Bar, Control Palette, and Field List.
19.In the form layout, stretch the display so that there is enough room to add a field to
the Main tab. You may need to maximize the Designer window in order to see the
entire form layout. Position the pointer on a bottom corner or the lower edge of the
form, and drag the form outward to enlarge the display.
20.Find user_number in the Fields List for ‘Defect window. Drag and drop the field
onto the form under the control for the Description field.
21.Adjust the positions of the name of the field and the text box control of the field to
have a better fit to the form layout.
23.In the Text Box Property Sheet dialog box, on the General tab, change the value
of the Label field to User Number. Click OK.
25.Apply the same field control to the Defect_Base form. Repeat Steps 17-24 on the
Defect_Base form.
26. Click File > Validate. The Validation Output windows indicate that “Validating
Schema…. 0 error(s) found. Validating Forms…. 0 warning(s) found.”
d. Click OK.
The ClearQuest client interface automatically appears with the user “admin” logged on.
31. On the Defect Submit form, fill in the proper values for all the mandatory fields
except the User Number field. Click OK to submit.
32. A warning message tells you that the field user_number is mandatory.
33. Enter an integer value in the User Number field. Click OK to submit. The defect
submission now passes.
35. Select Defect in the Choose Record Type dialog box, and click OK.
36. ClearQuest displays the new defect just submitted. Inspect the User Number field
on the Main tab. It should have the right value.
40. The ClearQuest Designer dialog box shows: “Schema ‘my_schema’ has been
checked in successfully.” Click OK.
TASK 6 – Upgrade the user database “my_db” with the new schema version.
42. The ClearQuest Designer dialog box shows: “This action cannot be reversed. Be
sure you have backed up the schema repository and the user database. Continue?”
Click Yes.
44. The “Upgrade Database – Step 2 of 2” dialog box indicates that one new version
is available for upgrading the database: 4. Select version 4 by highlighting it.
46. The ClearQuest Designer dialog box shows: “Database has been upgraded
successfully.” Click OK.
47. Close the ClearQuest Designer dialog box. This concludes Exercise 6.1.
Exercise 6.2: Add a parent/child control to the forms for linking records of the Defect
record type.
The purpose of this exercise is to create the parent/child control on both the Submit
form and the Record form to link records.
Is named Child_Defect.
2. Add the Child_Defect field and the Parent_Defect field to both the Submit form
and the Record form for the Defect record type.
b. Add the Child_Defect field and the Parent_Defect field to the Links tab
form.
c. Customize the list view control of the Child_Defect to display the id,
Headline, and State of the Child_Defect.
d. Customize the list view control of the Parent_Defect to display the id and
Headline of the Parent_Defect.
e. Copy and paste the Links tab form design from the Submit form to the
Record form of Defect record type.
5. Upgrade the user database my_db with the new schema version.
The following set of steps is one of the ways to approach the above tasks. You can use
these steps to accomplish the tasks listed in this exercise, or create your own.
TASK 1 – Create a new field named “Child_Defect” that has the Reference_List
data type. It references to the Defect record type and has the Back Reference set to
“Parent_Defect.”
1. Click Start > Programs > Rational Software > Rational ClearQuest >
ClearQuest Designer.
3. In the ClearQuest Designer Login dialog box, type “admin” as the User Name,
and leave the Password field blank. Click OK.
4. Select my_schema in the Open Schema Wizard. (Note that the latest version is 4.)
Click Next.
5. Type “Add a new field Child_Defect and apply the parent/child control with
this field to Defect forms” in the Comment field.
7. In the ClearQuest Designer window, click Record Types > Defect in the
Workspace.
TASK 2a – Create a new tab form called Links in the Submit form.
11. Click Record Types > Defect > Forms in the Workspace.
13. Select Edit > Add Tab. A new tab named Dialog Tab appears on the form layout.
15. Right-click the blank tab form, and select Tab Properties.
TASK 2b-2c – Add the Child_Defect field and the Parent_Defect field to the Links
tab form. Customize the list view control for Child_Defect to display the id,
Headline, and State of Child_Defect.
17. Drag and drop the Defect>Child_Defect field from the Field List window to the
Links tab.
18. Adjust the locations of the field label, the list view control, and three buttons Add,
Remove, and New to obtain a proper layout on the tab form. Enlarge the size of the
list view control to allow the display of at least three columns.
20. On the General tab of the List View property sheet, change the Label field to
“Child Defects.” Click OK.
21. In the list view control, the id field is the first field on the column header top bar of
the list view. Position the pointer at the dividing line between two columns in the
column header of the list view control. The pointer changes shape. Drag the
dividing line left or right to resize the spacing for each column.
23. Drag and drop Defect>Child_Defect>Headline from the Field List window to the
column header top bar in the list view control. Now the Headline field is the
second field on the column header top bar of the list view.
24. Drag and drop Defect>Child_Defect>State from the Field List window to the
column header top bar in the list view control. Now the State field is the third field
on the column header top bar of the list view.
TASK 2d – Customize the list view control of the Parent_Defect to display the ID
and headline of the Parent_Defect.
25. Drag and drop Defect>Parent_Defect from the Field List window to the Links tab
form.
26. Adjust the locations of the field label and the list view control. Resize the list view
control accordingly. In the list view control, the id field is the first field on the
column header top bar of the list view.
27. Drag and drop Defect>Parent_Defect>Headline from the Field List window to the
column header top bar in the list view control. Now the Headline field is the
second field on the column header top bar of the list view.
29. On the General tab of the List View property sheet, change the Label field to
“Parent Defect.” Click OK.
TASK 2e – Copy and paste the Links tab form design from the Submit form to the
Record form of Defect record type.
32. Click Edit > Add Tab. A new tab named Dialog Tab appears on the form layout.
34. Right-click the blank tab form, and select Tab Properties.
36. Click Edit > Paste. All of the Links tab form layout of the Defect_Base_Submit is
copied to the Defect_Base.
38. Click File > Validate. The Validation Output window indicates: Validating
Schema…. 0 error(s) found. Validating Forms…. 0 warning(s) found.
d. Click OK.
41. Click File > Test Work. The ClearQuest client interface appears automatically
with the user “admin” logged on.
42. Click the New Defect button on the toolbar.
43. On the Defect Submit form, fill in the proper values for all the mandatory fields,
including the User Number field.
44. Click the Links tab.
45. Click Add. In the Browse Record Type Defect dialog box, click Build Query.
46. Click Next in the ClearQuest Query Wizard.
47. Select id, Headline, and State in the “Define how the query displays” dialog box.
Click Next.
48. Click Next in the “Select fields to use as query filters” dialog box. This gets all
the defect records.
49. Click Run in the “Define query filters” dialog box. Now all the defect records
appear in the Results grid.
50. Select the defect record(s), and click OK. The defect record(s) appears in the list
view of child defects.
51. Select one defect record in the list view, and click Remove. The defect record is
removed from the list.
52. Click New. The Defect Submit form appears.
53. Fill in the proper values for all the mandatory fields. Click OK to submit. The new
defect record appears in the list of child defects.
54. Click OK to submit this new defect.
55. Click Query > Recently Submitted.
56. Select Defect in the Choose Record Type dialog box, and click OK.
57. ClearQuest displays the new defect just submitted. Inspect the list of child defects
on the Links tab. It should have the same list that you submitted.
58. Double-click one of the child defect records. In its Record form, click the Links
tab. The previous defect record appears in its parent defect list view.
59. Close the ClearQuest client.
62. The ClearQuest Designer dialog box shows: “Schema ‘my_schema’ has been
checked in successfully.” Click OK.
TASK 5 – Upgrade the user database “my_db” with the new schema version.
64. The ClearQuest Designer dialog box shows: “This action cannot be reversed. Be
sure you have backed up the schema repository and the user database. Continue?”
Click Yes.
65. In the “Upgrade Database – Step 1 of 2” dialog box, select my_db, my_schema
Version 4 in the list. Click Next.
66. The “Upgrade Database – Step 2 of 2” dialog box indicates that one new version
is available for upgrading the database: 5. Select version 5 by clicking it.
68. The ClearQuest Designer dialog box shows: “Database has been upgraded
successfully.” Click OK.
Exercise 6.3: Create a record type family, and run a multi-record type query.
The purpose of this exercise is to run a query that will search the results across multiple
record types.
1. Create a new record type family named All_Requests. This record type family has
both Defect and EnhancementRequest record types as its members.
2. Add Headline and Owner fields to the record type family All_Requests as the
common fields.
3. Test the new field functions in the test database by following these steps:
b. Run the Active Requests query. Review the query result that has records
of different record types.
5. Upgrade the user database my_db with the new schema version.
The following set of steps is one of the ways to approach the above tasks. You can use
these steps to accomplish the tasks listed in this exercise, or create your own.
TASK 1 – Create a new record type family named “All_Requests.” This record
type family has both Defect and EnhancementRequest record types as its members.
1. Click Start > Programs > Rational Software> Rational ClearQuest > Rational
ClearQuest Designer.
3. In the ClearQuest Designer Login dialog box, type “admin” as the User Name,
and leave the Password field blank. Click OK.
4. Select my_schema in the Open Schema Wizard. (Note that the latest version is 5.)
Click Next.
5. In the Comment field, type “Add a new record type family, ‘All_Requests’.”
b. Click Add. Both record types appear in the Record Type Family
Members section as well as in the Workspace under Record Type
Families>All_Requests>Members.
c. Click Close.
TASK 2 – Add “Headline” and “Owner” fields to the record type family
All_Requests as the common fields.
13. Double-click Fields under All_Requests. The corresponding Fields table appears in
the right pane.
15. On the General tab of the All_Requests Fields dialog box, on type “Headline” in
the Field Name field. Select SHORT_STRING in the Type field. Close the dialog
box to apply the changes.
17. On the General tab of the All_Requests Fields dialog box, on type “Owner” in
the Field Name field. Select REFERENCE in the Type field. Select users as in
the Reference To field. Close the dialog box to apply the changes.
d. Click OK.
The ClearQuest client interface automatically appears with the user “admin” logged on.
22. Click the down arrow on the right side of the New Defect button on the toolbar.
Select EnhancementRequest.
23. In the Submit form of the EnhancementRequest record type, fill in proper values
for all mandatory fields. Click OK.
26. Select All_Requests in the Choose Record Type dialog box. Click OK.
28. Double-click the following fields: id, Headline, State, and Record_type. This
selects them as the query display fields. Click Next.
c. Click Run.
TASK 3b – Run the “Active Requests” query. Review the query result that has
records of different record types.
31. Scroll up and down to view the result set. You should see a number of records of
the Defect record type and the records of the EnhancementRequest record type
that you submitted.
32. Select File > Save As. Type Active Requests as the query name.
36. The ClearQuest Designer dialog box shows: “Schema ‘my_schema’ has been
checked in successfully.” Click OK.
TASK 5 – Upgrade the user database “my_db” with the new schema version.
38. The ClearQuest Designer dialog box shows: “This action cannot be reversed. Be
sure you have backed up the schema repository and the user database. Continue?”
Click Yes.
39. In the “Upgrade Database – Step 1 of 2” dialog box, select my_db, my_schema
Version 5 in the list. Click Next.
40. The “Upgrade Database – Step 2 of 2” dialog box indicates that one new version
is available for upgrading the database: 6. Select version 6 by highlighting it.
42. The ClearQuest Designer dialog box shows: “Database has been upgraded
successfully.” Click OK.
43. Close the ClearQuest Designer dialog box. This concludes Exercise 6.3.