It is often useful to search for issues in order to make a selection from the result set, and relate this selection to the current record. The selection may be a subset of the result set. For example, you might have a business area that contains a library of test cases, and you want to create any number of test plans from this library. Each test plan might have a different subset of records chosen from the library.
Initial presentation of screen
In the above screen, you will observe a search layout; this is used to provide a filtered set of search results within a related issue display. Note the buttons in the header of the related issue display.
Entering the search criteria and seeing the results
Once you have selected filters, use the Get Filtered Results button to display the results in the related issue display. With your mouse, you can click on any of the results to select that record. There is also a button to Check All the results at one time.
The selected results now related to the parent issue
Use the Fetch Selected Record(s) to move all the selected records into the final result set where they will be stored with the parent issue. Note that the search layout and results are reset. You may repeat the search and selection process to add additional child records to the parent record. The basic configuration involves setting up 3 embedded layouts, one for the search, one for the search results and one for the selected records. A text or text area field is used to connect the selected valus from the search results to the selected records:
This is created within the Administration utility, Relationship Group Maintenance. This should be of the type One-to-Many. In our example, we named this TEST_CASES_TEST_PLANS and gave it a title of Test Cases / Test Plans.
A prerequisite to making the search layout operate is to configure the Quickfind feature. Once this has been done, create a new layout type. This may have any name and any title, but it must have a usage type of Search. This is used to contain the search filters that will be displayed to the user. For our example, we will use the name TEST_CASE_SEARCH. Next, add the new layout to the area and project where it is needed, creating a new layout. Onto this layout, you will place the fields to be used as filters. No special layout cell attributes are required, but you may use whatever attributes help you provide an aesthetically pleasing display. Save this layout.
The search layout
This is used to contain the results of the search. Note that the fields displayed do not need to match the fields within the search layout, although it is common to see several fields in common. Create a new layout type to contain the related issue display. By convention, begin the name of the new layout type with RELATED_ and followed by remaining characters that provide an unique name for the layout. The usage type of this layout must be Report. For our example, we name this layout type RELATED_TEST_CASE_RESULTS. Now, add the new layout to the area and project where it is needed, creating a new layout. In the first column of the layout, place the inbuilt field with the name RELATIONSHIP_GROUP_CHOOSE_BTN. This is used as the selector for the record(s) whose results you want to place into the add or edit screen. It is recommended that you only place the VIEW_BUTTON as any other button on this layout. You should not place other buttons such as EDIT_BUTTON or QUICKEDIT_BUTTON on this layout as this layout only displays search results. Place the remaining fields that you want to display on the related issue display on the layout, and save the layout.
The related issue display layout with the results
This layout is typically similar to the previous one you created, in terms of the fields you display, but you will likely want to see different buttons. Most typical is to include a VIEW_BUTTON, and an EDIT_BUTtON. A QUICKEDIT_BUTTON is often useful.
The related issue display layout that displays the selected records
A link field is required to pass the results from the selection made on the Related Issue Display layout with these characteristics:
Cell attributes on the results layout
Here, you place layout cell attributes on the layout named LAYOUT.RELATED_TEST_CASE_RESULTS. This layout displays the records you selected within the search results. The attributes this layout needs are:
Cell attributes on the child record layout