Initial add of defaria.com
[clearscm.git] / defaria.com / blogs / Status / archives / 000687.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" id="sixapart-standard">
4 <head>
5    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6    <meta name="generator" content="Movable Type 5.2.3" />
7
8    <link rel="stylesheet" href="http://defaria.com/blogs/Status/styles-site.css" type="text/css" />
9    <link rel="alternate" type="application/atom+xml" title="Atom" href="http://defaria.com/blogs/Status/atom.xml" />
10    <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="http://defaria.com/blogs/Status/index.xml" />
11
12    <title>Status for Andrew DeFaria: cqtool</title>
13
14    <link rel="start" href="http://defaria.com/blogs/Status/" title="Home" />
15    <link rel="prev" href="http://defaria.com/blogs/Status/archives/000686.html" title="cqtalk" />
16    <link rel="next" href="http://defaria.com/blogs/Status/archives/000688.html" title="UCMWB enhancements/Helpdesk Tickets" />
17
18    <!--
19 <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
20          xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/"
21          xmlns:dc="http://purl.org/dc/elements/1.1/">
22 <rdf:Description
23     rdf:about="http://defaria.com/blogs/Status/archives/000687.html"
24     trackback:ping="http://defaria.com/mt/mt-tb.cgi/74"
25     dc:title="cqtool"
26     dc:identifier="http://defaria.com/blogs/Status/archives/000687.html"
27     dc:subject="General Dynamics"
28     dc:description=" Sent cqtool out for code review..."
29     dc:creator=""
30     dc:date="2007-10-10T15:08:55-06:00" />
31 </rdf:RDF>
32 -->
33
34
35    
36
37    <script type="text/javascript" src="http://defaria.com/blogs/Status/mt-site.js"></script>
38 </head>
39 <body class="layout-one-column" onload="individualArchivesOnLoad(commenter_name)">
40    <div id="container">
41       <div id="container-inner" class="pkg">
42
43          <div id="banner">
44             <div id="banner-inner" class="pkg">
45                <h1 id="banner-header"><a href="http://defaria.com/blogs/Status/" accesskey="1">Status for Andrew DeFaria</a></h1>
46                <h2 id="banner-description">Searchable status reports and work log</h2>
47             </div>
48          </div>
49
50          <div id="pagebody">
51             <div id="pagebody-inner" class="pkg">
52                <div id="alpha">
53                   <div id="alpha-inner" class="pkg">
54
55                      <p class="content-nav">
56                         <a href="http://defaria.com/blogs/Status/archives/000686.html">&laquo; cqtalk</a> |
57                         <a href="http://defaria.com/blogs/Status/">Main</a>
58                         | <a href="http://defaria.com/blogs/Status/archives/000688.html">UCMWB enhancements/Helpdesk Tickets &raquo;</a>
59                      </p>
60
61                      <a id="a000687"></a>
62                      <div class="entry" id="entry-687">
63                         <h3 class="entry-header">cqtool</h3>
64                         <div class="entry-content">
65                            <div class="entry-body">
66                               <ul>
67   <li>Sent cqtool out for code review</li>
68 </ul>
69                            </div>
70                            <div id="more" class="entry-more">
71                               <h3>Introducing cqtool</h3>
72
73 <p>I have implemented a new script called cqtool. This is to replace
74 the unsupported /opt/rational/clearquest/bin/cqtool which is going
75 away as of Clearquest 7.0. UCMWB utilized IBM/Rational's cqtool to
76 perform certain actions. Additionally, as per Erik's RANCQ00014935
77 request to enhance UCMWB to be able to create child WORs a tool needed
78 to be developed to do that. So the new cqtool solves the following
79 issues:</p>
80
81 <ul>
82   <li>Provides a supported replacement for the following bits of UCMWB
83 functionality:</li>
84   <ul>
85     <li>Cloning of WORs (Right click: Continue work in Clone on a
86 closed non-orphan WOR)<br>
87     </li>
88     <li> Creation of Helpdesk tickets (Tools: Submit Helpdesk Request)</li>
89   </ul>
90   <li>Adds the following functionality:</li>
91   <ul>
92     <li>Allows for creation of new WORs</li>
93     <li>Allows for linking of parent WOR to child WOR</li>
94   </ul>
95 </ul>
96
97 <p>Additionally, with the create WOR functionality, UCMWB can offer
98 the ability to create a new, non parent/child WOR. Finally, as has
99 been stated, with this new cqtool we don't have to worry about
100 IBM/Rational's cqtool disappearing in CQ 7.0.</p>
101
102 <p>This is an involved process so I created this in a modularized
103 fashion thus several Perl modules are involved. As per Ken's mandate,
104 I am calling for a code review of what I have so far. Next I will hook
105 this into UCMWB.</p>
106
107 <p>So far I have a cqperl script called cqtool. It relies on several Perl
108 Modules, some of which I have added to Clearcase and our <i>standard
109 lib</i> directory already
110 (/cleartrig/ent/SNSD/muos/ccadm_tools/vobs/ranccadm/scripts/lib):</p>
111
112 <table align="center" border="1" cellpadding="2" cellspacing="0"
113  width="90%">
114   <tbody>
115     <tr>
116       <th bgcolor="#33ccff" valign="top">Module<br>
117       </th>
118       <th bgcolor="#33ccff" valign="top">Description<br>
119       </th>
120       <th bgcolor="#33ccff" valign="top">Location<br>
121       </th>
122     </tr>
123     <tr>
124       <td valign="top"><b>Display<br>
125       </b></td>
126       <td valign="top">Module for providing consistent output</td>
127       <td valign="top"><i>standard lib</i><br>
128       </td>
129     </tr>
130     <tr>
131       <td valign="top"><b>CQTool<br>
132       </b></td>
133       <td valign="top">Handles communications with Clearquest</td>
134       <td valign="top">~p6258c/adm/lib<br>
135       </td>
136     </tr>
137     <tr>
138       <td valign="top"><b>CreateWORUI</b></td>
139       <td valign="top">UI for CreateWOR</td>
140       <td valign="top">~p6258c/adm/lib</td>
141     </tr>
142     <tr>
143       <td valign="top"><b>CreateHelpDeskUI</b></td>
144       <td valign="top">UI for CreateHelpDesk</td>
145       <td valign="top">~p6258c/adm/lib</td>
146     </tr>
147     <tr>
148       <td valign="top"><b>Tk::MyText</b></td>
149       <td valign="top">Subclasses the Tk TextUndo<br>
150 widget. This is used for the description fields in both CreateWOR<br>
151 and CreateHelpDesk. The subclassing was necessary in order to<br>
152 provide for a modified callback that allows us to tell when the<br>
153 widget has text and thus can set the Submit button to active.</td>
154       <td valign="top">~p6258c/adm/lib</td>
155     </tr>
156   </tbody>
157 </table>
158
159 <p>Additionally there is a cqtool script itself which is a command
160 line interface/driver that was initially used to test the
161 functionality provided in the above modules. It has been oriented to
162 be the primary interface to this functionality. The thought is that
163 UCMWB will fire up cqtool in the background at start up and then, if
164 and when it's functionality is needed, UCMWB will feed commands to the
165 already running cqtool.</p>
166
167 <p>When run interactively, cqtool prompts for a command. It will also
168 read commands from $ARGV, execute them and exit. So, in a sense,
169 cqtool works like cleartool.</p>
170
171 <p>If you type help at the prompt the following is displayed:</p>
172
173 <div class=code><pre>
174 cqtool Version 0.9: Program to talk to Clearquest
175
176 Valid commands are:
177
178 createwor:                      Create a new WOR
179 createhd:                       Create a new Help Desk Ticket
180 clone &lt;wor&gt;                       Clones a WOR
181 link &lt;parent wor&gt; &lt;child wor&gt;       Link a parent WOR to a child
182 WOR
183 exit|quit:                      Exits cqtool
184 help:                           This display
185 usage:                          Displays command line usage
186 version:                        Displays version of cqtool
187 </pre></div>
188
189 <p>createwor and createhd both are Perl/Tk applications that interact
190 with Clearquest and display a GUI that obtains the necessary and
191 required fields to create a WOR or a Helpdesk ticket. Note, only the
192 bare minimum fields are available. IOW I didn't implement the whole UI
193 that Clearquest provides. Instead it's just enough to create the WOR
194 or Helpdesk ticket.</p>
195
196 <p>cqtool pays attention to a few environment variables:</p>
197
198 <dl>
199   <dt><b>CQ_DBSET</b></dt>
200
201     <dd>Set to the dbset name of the Clearquest database to work with.
202     For testing purposes set this to XTST3. Production would be
203     RANCQ</dd>
204
205   <dt><b>CQ_USER</b></dt>
206
207     <dd>Name of the user to log in as. By default $USER is used. For
208     testing purposes set this to "ccadm" (for the XTST3 database that
209     is)</dd>
210
211   <dt><b>CQ_PASSWORD</b></dt>
212
213     <dd>Set to the password for CQ_USER. For testing purposes set this
214     to "ccadm" (for the XTST3 database that is). If this is not set
215     then cqtool prompts for a password.</dd>
216 </dl>
217
218 <p>So then, with the proper environment variables set one can:</p>
219
220
221 <div class=code><pre>
222 $ cqtool help
223 cqtool Version 0.9: Program to talk to Clearquest
224
225 Valid commands are:
226
227 createwor:                      Create a new WOR
228 createhd:                       Create a new Help Desk Ticket
229 clone &lt;wor&gt;                       Clones a WOR
230 link &lt;parent wor&gt; &lt;child wor&gt;       Link a parent WOR to a child
231 WOR
232 exit|quit:                      Exits cqtool
233 help:                           This display
234 usage:                          Displays command line usage
235 version:                        Displays version of cqtool
236 </pre></div>
237
238 <p>or</p>
239
240 <div class=code><pre>
241 $ cqtool createwor
242 </pre></div>
243
244 <p>Oh, where is cqtool? Well for now it's in ~p6258c/adm/cq/cqtool
245 (libs in ~p6258c/adm/lib/*).</p>
246
247                            </div>
248                         </div>
249                         <p class="entry-footer">
250                            <span class="post-footers">Posted by  on October 10, 2007  3:08 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000687.html">Permalink</a>
251                         </p>
252                      </div>
253
254                      
255                      <div class="trackbacks">
256                         <h3 id="trackback" class="trackbacks-header">TrackBack</h3>
257                         <div id="trackbacks-info">
258                            <p>TrackBack URL for this entry:<br />http://defaria.com/mt/mt-tb.cgi/74</p>
259                         </div>
260                         <div class="trackbacks-content">
261                            
262                         </div>
263                      </div>
264                      
265
266                      
267                   </div>
268                </div>
269             </div>
270          </div>
271       </div>
272    </div>
273 </body>
274 </html>