Unified Change Management: Developer role
As a developer, identifying and managing the work you are expected to do and informing others of the work you have done can be one of the biggest challenges in team-based development. With strong organization and communication channels, the development team can stay in synch and react quickly to new information.
Now you can use ClearQuest directly from within the Eclipse environment to review the tasks you need to do. ClearQuest makes creating reports easy with simple to use wizards. You can easily make personal or public queries on any record type in the database.
In this section you will learn how to:
- Create a To Do list from a query
- Join a Unified Change Management Project
- Deliver an activity to an integration stream
Let's take a look at the querying functions available in Rational ClearQuest. We will start by creating a new query for the developer Alex that will run each time he logs into ClearQuest. This query will show him his 'To Do' list.
- In the ClearQuest perspective, click the ClearQuest menu and then click Login > Login.
- Log in as user/password alex/alex.
- Right click on Personal Queries and select New Query.
Figure 6. Starting a new personal query
- From the Query Wizard, select the record type Defect and give the query a name like Alex_defects, and click Next.
Figure 7. Selecting the defect record type
- Now pick the fields you want to filter your query. From the left pane, double click Headline, ID, Owner and Priority, and click Next.
Figure 8. Selecting the fields for query filters
- Now select the value to filter on. Expand the And menu, highlight Owner and click the Values button.
Figure 9. Selecting the query values
- In the Select Values pop-up window, select a value for the Owner field: Put a check mark next to Alex then click OK.
Figure 10. The Select Values dialog box
- In the Define Query Filters step of the Query Wizard, click Next.
- Now you will define which fields and the order in which to display them. In the Define Display Fields step of the wizard, in the following order, select:
Figure 11. Defining the Display Fields
Once your query is defined, you can have it run immediately after finishing the Wizard. Based on the query we just defined, the developer Alex can now quickly discover any new work that he may have. It looks like the project lead Pat, just assigned Alex some new work. Let's take a look at what is needed to fix this defect.
- Double click on defect CLSIC00000058, Fix spelling error in Readme.html, which Pat just assigned to Alex.
- Review the details of this defect, including the note that Pat left on the Notes tab, and close the defect form.
Important information can be shared with your team members easily with ClearQuest forms. All your notes get stored in a secure database, so you can rebuild a complete history of every defect that's been worked on.
- Disconnect from ClearQuest as user Alex.
IBM Rational ClearCase and Rational ClearQuest change management products work together to allow you to define and manage changes to software assets as activities. Through the Unified Change Management (UCM )capability, file versions in Rational ClearCase software are associated with activities in Rational ClearQuest. Developers can then perform operations directly on the activities rather than on the collections of files associated with them. This activity-based approach to change and configuration management helps developers to work on the right versions of the right files. It allows them to create collections of file versions, or "change sets," for each individual change. This enables developers to manage their work at the task level, instead of managing individual files. It helps build engineers ascertain that the right files are incorporated into the build. Testers can easily confirm that the right functionality and builds are tested. Quality assurance (QA) engineers can quickly see and validate what has changed between builds. And project managers can more easily track and assess project status.
- Click on the ClearCase perspective. Click the Join a UCM Project button on the Toolbar.
Figure 12. Joining the UCM project
- In the Join UCM Project wizard, under ClearCase Web server URL, enter:
- Enter alex/alex in the User Name/Password fields, and click Next.
Figure 13. Selecting a ClearCase Web server
- Under Select a UCM project to join, expand the CLSICS_pvob menu, select the UCM Project CLSICS_CD and click Next.
Figure 14. Selecting a project
- In the Specify UCM Streams step of the wizard, select the checkbox to Create a new development stream. Under Stream name, enter alex_task_stream, and click Next.
Figure 15. Creating a new project stream
- In the Create a ClearCase UCM development view step, under Copy area path name, enter the path to the view copy area : C:\Documents and Settings\Administrator\alex_task_stream, and click Next.
Figure 16. Creating a development view
- In the Create a ClearCase UCM integration view step, select the checkbox to Create a ClearCase integration view. Under Copy area path name, name the view copy area: C:\Documents and Settings\Administrator\alex_CLSICS_CD_intg, and click Finish.
Figure 17. Creating an integration view
- When prompted to use the Clearcase View Configuration tool to load the views, click Yes.
Figure 18. Loading the views
- In the ClearCase View Configuration dialog box, Click the checkbox to Show all VOBs (includes private VOBs), then select the root of the CLSICS_comp1 VOB and click OK.
Figure 19. Adding the load rules for the view
After choosing your view's configuration, you must select which assets you want to work on. Once the selection is made, your local workspace becomes populated with those files and directories.
Figure 20. Loading the files to the view
Now we want to find the activity that we are going to be working on.
- In ClearCase Explorer, click on My Activities under the newly created 'task' view.
Figure 21. Activities associated with the view
Because our UCM project is linked to ClearQuest, we need to login to the database to get a list of available defects.
- Log in to the ClearQuest database using username/password alex/alex.
Figure 22. Logging in to ClearQuest
- Select the activity Fix spelling error in Readme.html, right-click, and click Work on Activity.
Figure 23. Selecting an activity to work on
To verify the defect, navigate to Readme.html (in the ClearCase Details pane) by double-clicking on CLSICS_comp > MyHomePage > WebContent. Right-click on the file Readme.html and click Open. You should see the file displayed in a browser window, and verify the two spelling errors in the headline. Close the browser window.
- Open a Resource perspective by clicking on the Open a perspective button in the upper right corner of the ClearCase perspective, and clicking Resource.
Figure 24. Opening a Resource perspective
- In the Resource perspective, click the File menu and then click Import
Figure 25. Importing the project
- Under Select an import source, select Existing project into Workspace and click Next.
Figure 26. Selecting an import source
- Click the Browse button and navigate to the MyHomePage directory, (path:
C:\Documents and Settings\Administrator\alex_task_stream\CLSICS_comp1\MyHomePage), click OK, and click Finish.
Figure 27. Importing the project
- Navigate to the file
Readme.html(found in the
Figure 28. Importing the project
- Find the line starting '<h2 ' From here you can see the spelling errors that need to be corrected.
- Try to delete the extra 'd' in the word 'Readme.'
The application is aware that the file you are editing is under source control. Any attempts to modify it, will prompt you to check the file out.
- In the Checkout Resources dialog box, click Apply to check the file out. (Note that the activity you chose to work on in the previous step, is selected by default.)
Figure 29. Checking out the file
- Correct the spelling errors by removing the extra 'd' in 'Readme' and the 'i' from 'Home.'
- Save the changes by clicking the Save button.
Typically after a developer makes changes to any files, he will want to test those changes. For the sake of this evaluation, we won't need to test our changes, but let's at least verify that we did correct the defect.
- Navigate back to the ClearCase perspective.
- Right-click on the file again and select Open. Verify that the defect is fixed.
The changes look good! Let's make our changes complete by checking the file back in to the repository.
- Close the web browser window displaying the file.
- Right click on
Readme.htmland select Checkin. Accept all defaults and click Apply. (You can use the same comment to check in the file as you did to check it out.)
Figure 30. Checking the file back in
Now the file is checked in to the VOB.
While we've made the necessary changes in our own work area, the changes haven't yet been propagated to the project. Moving changes made for an activity (or activities) from a development work area to a project integration work area is called a Deliver operation.
Delivering changes to the project only when appropriate enables developers to work independently in parallel with each other while maintaining project stability.
Now let's deliver our completed activity to the project.
- Click on Alex's development view. Then click on the Deliver Stream icon in the ClearCase toolbar at the top of the screen.
Figure 31. Deliver button
- In the Deliver from Stream window, be sure to check the Merge elements graphically checkbox.
Figure 32. Delivering from a stream
- Click the Detail button to confirm the activities being delivered.
- Click Change to change the view to select the proper view target. Select alex_CLSICS_CD_intg and click OK.
- Click OK to begin delivering the change.
Figure 33. Selecting the view
Rational ClearCase uses the information associated with your development stream to determine which activities have been worked on and are ready to be delivered. Based on that information, it knows which files need to be merged to your project's Integration stream.
As long as there are no conflicts between your changes and changes made by other developers on your project, the delivery will be completed without any further intervention. In this example, there is a conflict.
In cases where there are conflicts that require you to intervene, Rational ClearCase will walk you through the process of resolving the conflicts.
- In the Deliver dialog box, click Yes to start the merge tool
First, you select the option to use the graphical merge tool to resolve the conflicts. You show both changes to see what the differences are. You see that there is a conflict between the changes that you made and the version that was in your project's integration stream. If you examine the difference however, you can see that the change that you made in your private development workspace are in fact the correct changes, so we will want to accept those changes. To complete the merge, you save the file and exit the merge tool.
Figure 34. Starting the merge
- Click OK in the Diff Merge dialog box to begin the merge.
Figure 35. Resolving the differences
- Contributor 2 has the change that was made. Click the button 2 on the toolbar to accept that change.
Figure 36. Confirming the changes
- Confirm that the resulting change is correct, and click the Save button.
- If prompted, click Yes to replace the output file.
- Close the merge tool.
- Click OK in the confirming Deliver dialog box.
Figure 37. Confirming the merge
- The deliver results are now displayed.
Figure 38. Results of deliver operation
- Navigate to the integration view that was used as the deliver target and open the
Readme.htmlfile to verify that the change made it to the integration view. Close the web browser.
- Click the Complete Deliver button in the delivery summary pane to finish the deliver operation.
Figure 39. Completing the deliver
- Click the Resolution tab on the ClearQuest web form.
- Pick the resolution Fixed from the drop-down and click Save.
- Close the ClearQuest Web form.
Before completing any deliver operations, teams should ensure that the changes that were delivered are good, and don't impact other work in the integration area. At this point, most teams would want to run a build or test to ensure that everything will still work after the deliver. Teams want to take this step before completing the deliver operation because they have the opportunity to cancel rather then complete.
However, our changes look good, so we can complete this deliver operation. Because our UCM project is integrated with Rational ClearQuest, we are automatically transitioning the RCQ defect to the next stage of the workflow. Teams can choose to automatically transition ClearQuest defects to 'complete' states on a per UCM project basis.
You may want to show a version tree of the
Readme.html file. By taking a look at the version tree of the file, we can get a graphical picture of what happens during the deliver process. Deliver automatically takes private changes from a developer's workspace and merges them to another stream. Deliver can be done between developers, to task streams, to a common integration point, or even to teams working on different projects.
To view the version tree for this file, do the following:
- Right-click it and select Tools > Show Version Tree.
Figure 40. Showing the version tree
Figure 41. Version tree for Readme.html