" /> Status for Andrew DeFaria: October 7, 2007 - October 13, 2007 Archives

« September 30, 2007 - October 6, 2007 | Main | October 14, 2007 - October 20, 2007 »

October 12, 2007

UCMWB enhancements/Helpdesk Tickets

  • Added CreateWOR button and hooked it so that we can now create WORs in UCMWB (from File: Create New WOR or the Create WOR toolbar button)
  • Added multiselection to View browser
  • Enhanced Delete View to be Delete View(s) and to iterate over the selected views deleting them. Need to clean up the display of change sets and view private files when more than one view is selected.
  • Worked with Judy regarding RANCQ00017440: Update RanSimcello Switcher config spec for P4.0.24
  • Closed tickets:
    • RANCQ00016665: UEH Tools Based on 4.0.6 versus 4.0.24 Config Spec
    • RANCQ00016964: RoseRT does not open

October 10, 2007

cqtool

  • Sent cqtool out for code review

Introducing cqtool

I have implemented a new script called cqtool. This is to replace the unsupported /opt/rational/clearquest/bin/cqtool which is going away as of Clearquest 7.0. UCMWB utilized IBM/Rational's cqtool to perform certain actions. Additionally, as per Erik's RANCQ00014935 request to enhance UCMWB to be able to create child WORs a tool needed to be developed to do that. So the new cqtool solves the following issues:

  • Provides a supported replacement for the following bits of UCMWB functionality:
    • Cloning of WORs (Right click: Continue work in Clone on a closed non-orphan WOR)
    • Creation of Helpdesk tickets (Tools: Submit Helpdesk Request)
  • Adds the following functionality:
    • Allows for creation of new WORs
    • Allows for linking of parent WOR to child WOR

Additionally, with the create WOR functionality, UCMWB can offer the ability to create a new, non parent/child WOR. Finally, as has been stated, with this new cqtool we don't have to worry about IBM/Rational's cqtool disappearing in CQ 7.0.

This is an involved process so I created this in a modularized fashion thus several Perl modules are involved. As per Ken's mandate, I am calling for a code review of what I have so far. Next I will hook this into UCMWB.

So far I have a cqperl script called cqtool. It relies on several Perl Modules, some of which I have added to Clearcase and our standard lib directory already (/cleartrig/ent/SNSD/muos/ccadm_tools/vobs/ranccadm/scripts/lib):

Module
Description
Location
Display
Module for providing consistent output standard lib
CQTool
Handles communications with Clearquest ~p6258c/adm/lib
CreateWORUI UI for CreateWOR ~p6258c/adm/lib
CreateHelpDeskUI UI for CreateHelpDesk ~p6258c/adm/lib
Tk::MyText Subclasses the Tk TextUndo
widget. This is used for the description fields in both CreateWOR
and CreateHelpDesk. The subclassing was necessary in order to
provide for a modified callback that allows us to tell when the
widget has text and thus can set the Submit button to active.
~p6258c/adm/lib

Additionally there is a cqtool script itself which is a command line interface/driver that was initially used to test the functionality provided in the above modules. It has been oriented to be the primary interface to this functionality. The thought is that UCMWB will fire up cqtool in the background at start up and then, if and when it's functionality is needed, UCMWB will feed commands to the already running cqtool.

When run interactively, cqtool prompts for a command. It will also read commands from $ARGV, execute them and exit. So, in a sense, cqtool works like cleartool.

If you type help at the prompt the following is displayed:

cqtool Version 0.9: Program to talk to Clearquest

Valid commands are:

createwor:			Create a new WOR
createhd:			Create a new Help Desk Ticket
clone <wor>			Clones a WOR
link <parent wor> <child wor>	Link a parent WOR to a child
WOR
exit|quit:			Exits cqtool
help:				This display
usage:				Displays command line usage
version:			Displays version of cqtool

createwor and createhd both are Perl/Tk applications that interact with Clearquest and display a GUI that obtains the necessary and required fields to create a WOR or a Helpdesk ticket. Note, only the bare minimum fields are available. IOW I didn't implement the whole UI that Clearquest provides. Instead it's just enough to create the WOR or Helpdesk ticket.

cqtool pays attention to a few environment variables:

CQ_DBSET
Set to the dbset name of the Clearquest database to work with. For testing purposes set this to XTST3. Production would be RANCQ
CQ_USER
Name of the user to log in as. By default $USER is used. For testing purposes set this to "ccadm" (for the XTST3 database that is)
CQ_PASSWORD
Set to the password for CQ_USER. For testing purposes set this to "ccadm" (for the XTST3 database that is). If this is not set then cqtool prompts for a password.

So then, with the proper environment variables set one can:

$ cqtool help
cqtool Version 0.9: Program to talk to Clearquest

Valid commands are:

createwor:			Create a new WOR
createhd:			Create a new Help Desk Ticket
clone <wor>			Clones a WOR
link <parent wor> <child wor>	Link a parent WOR to a child
WOR
exit|quit:			Exits cqtool
help:				This display
usage:				Displays command line usage
version:			Displays version of cqtool

or

$ cqtool createwor

Oh, where is cqtool? Well for now it's in ~p6258c/adm/cq/cqtool (libs in ~p6258c/adm/lib/*).

October 9, 2007

cqtalk

  • Fixed issue with clone. Was core dumping cqperl. Should not be calling cloneWor unless the WOR is in a closed state. Changed code to check that the WOR is closed before attempting call to FireRecordScript for cloneWor.
  • Resolved issues with cqtalk's createwor and createhd Perl/Tk apps. They used to blow up when run a second time. Turns out you need to make sure you destroy and undef all global objects first.
  • Fixed issue with link option. Turns out that if we hit an error say getting an entity, because it was provided to use incorrectly (say typo), then even though we are using eval to trap this error, internal state of the session variable gets screwed up. The workaround is to re-establish the session by closing and re-opening the database. Time consuming but it works.