Initial add of defaria.com
[clearscm.git] / defaria.com / blogs / Status / 2007 / 10 / cqtool.html
1 <!DOCTYPE html>
2 <html lang="en-us" itemscope itemtype="http://schema.org/Article">
3   <head>
4     <meta charset="utf-8">
5     <meta name="description" content=" Sent cqtool out for code review...">
6     <meta name="generator" content="Movable Type 5.2.3">
7     <title>cqtool - Status</title>
8     <link rel="alternate" type="application/atom+xml" title="Recent Entries" href="http://defaria.com/blogs/Status/atom.xml">
9     <link rel="canonical" href="http://defaria.com/blogs/Status/2007/10/cqtool.html">
10     <meta name="viewport" content="width=device-width,initial-scale=1">
11     <link rel="stylesheet" href="http://defaria.com/blogs/Status/styles.css">
12     <!--[if lt IE 9]>
13     <link rel="stylesheet" href="http://defaria.com/blogs/Status/styles_ie.css">
14     <script src="/mt/mt-static/support/theme_static/rainier/js/html5shiv.js"></script>
15     <![endif]-->
16     
17     <link rel="start" href="http://defaria.com/blogs/Status/">
18
19     <link rel="prev" href="http://defaria.com/blogs/Status/2007/10/cqtalk.html" title="cqtalk">
20     <link rel="next" href="http://defaria.com/blogs/Status/2007/10/ucmwb-added-cre.html" title="UCMWB enhancements/Helpdesk Tickets">
21     <!-- Open Graph Protocol -->
22     <meta property="og:type" content="article">
23     <meta property="og:locale" content="en-us">
24     <meta property="og:title" content="cqtool">
25     <meta property="og:url" content="http://defaria.com/blogs/Status/2007/10/cqtool.html">
26     <meta property="og:description" content=" Sent cqtool out for code review...">
27     <meta property="og:site_name" content="Status">
28     <meta property="og:image" content="/mt/mt-static/support/theme_static/rainier/img/siteicon-sample.png">
29     <!-- Metadata -->
30     <meta itemprop="description" content=" Sent cqtool out for code review...">
31     <link itemprop="url" href="http://defaria.com/blogs/Status/2007/10/cqtool.html">
32     <link itemprop="image" href="/mt/mt-static/support/theme_static/rainier/img/siteicon-sample.png">
33     
34   </head>
35   <body>
36     <div id="container">
37       <div id="container-inner">
38         <header id="header" role="banner">
39           <div id="header-inner">
40             <div id="header-content">
41               <h1>
42                 <a href="http://defaria.com/blogs/Status/">
43
44                   Status
45
46                 </a>
47               </h1>
48               
49             </div>
50
51             <nav role="navigation">
52           <ul>
53             <li><a href="http://defaria.com/blogs/Status/">Home</a></li>
54
55
56           </ul>
57         </nav>
58
59           </div>
60         </header>
61         <div id="content">
62           <div id="content-inner">
63             <ul class="breadcrumb breadcrumb-list">
64               <li class="breadcrumb-list-item"><a href="http://defaria.com/blogs/Status/">Home</a></li>
65               <li class="breadcrumb-list-item">cqtool</li>
66             </ul>
67             <div id="individual-main" class="main" role="main">
68               <article id="entry-1934" class="entry entry-asset asset hentry">
69                 <div class="asset-header">
70                   <h2 itemprop="name" class="asset-name entry-title">cqtool</h2>
71                   <footer class="asset-meta">
72                     <ul class="asset-meta-list">
73                       <li class="asset-meta-list-item">Posted on <time datetime="2007-10-10T15:08:55-08:00" itemprop="datePublished">October 10, 2007</time></li>
74                       <li class="asset-meta-list-item">by <span class="author entry-author vcard"></span></li>
75
76   
77                       <li class="asset-meta-list-item">in <a itemprop="articleSection" rel="tag" href="http://defaria.com/blogs/Status/general-dynamics/">General Dynamics</a></li>
78   
79
80                    </ul>
81                 </footer>
82                 </div>
83                 <div class="entry-content asset-content" itemprop="articleBody">
84                   <ul>
85   <li>Sent cqtool out for code review</li>
86 </ul>
87                   <h3>Introducing cqtool</h3>
88
89 <p>I have implemented a new script called cqtool. This is to replace
90 the unsupported /opt/rational/clearquest/bin/cqtool which is going
91 away as of Clearquest 7.0. UCMWB utilized IBM/Rational's cqtool to
92 perform certain actions. Additionally, as per Erik's RANCQ00014935
93 request to enhance UCMWB to be able to create child WORs a tool needed
94 to be developed to do that. So the new cqtool solves the following
95 issues:</p>
96
97 <ul>
98   <li>Provides a supported replacement for the following bits of UCMWB
99 functionality:</li>
100   <ul>
101     <li>Cloning of WORs (Right click: Continue work in Clone on a
102 closed non-orphan WOR)<br>
103     </li>
104     <li> Creation of Helpdesk tickets (Tools: Submit Helpdesk Request)</li>
105   </ul>
106   <li>Adds the following functionality:</li>
107   <ul>
108     <li>Allows for creation of new WORs</li>
109     <li>Allows for linking of parent WOR to child WOR</li>
110   </ul>
111 </ul>
112
113 <p>Additionally, with the create WOR functionality, UCMWB can offer
114 the ability to create a new, non parent/child WOR. Finally, as has
115 been stated, with this new cqtool we don't have to worry about
116 IBM/Rational's cqtool disappearing in CQ 7.0.</p>
117
118 <p>This is an involved process so I created this in a modularized
119 fashion thus several Perl modules are involved. As per Ken's mandate,
120 I am calling for a code review of what I have so far. Next I will hook
121 this into UCMWB.</p>
122
123 <p>So far I have a cqperl script called cqtool. It relies on several Perl
124 Modules, some of which I have added to Clearcase and our <i>standard
125 lib</i> directory already
126 (/cleartrig/ent/SNSD/muos/ccadm_tools/vobs/ranccadm/scripts/lib):</p>
127
128 <table align="center" border="1" cellpadding="2" cellspacing="0"
129  width="90%">
130   <tbody>
131     <tr>
132       <th bgcolor="#33ccff" valign="top">Module<br>
133       </th>
134       <th bgcolor="#33ccff" valign="top">Description<br>
135       </th>
136       <th bgcolor="#33ccff" valign="top">Location<br>
137       </th>
138     </tr>
139     <tr>
140       <td valign="top"><b>Display<br>
141       </b></td>
142       <td valign="top">Module for providing consistent output</td>
143       <td valign="top"><i>standard lib</i><br>
144       </td>
145     </tr>
146     <tr>
147       <td valign="top"><b>CQTool<br>
148       </b></td>
149       <td valign="top">Handles communications with Clearquest</td>
150       <td valign="top">~p6258c/adm/lib<br>
151       </td>
152     </tr>
153     <tr>
154       <td valign="top"><b>CreateWORUI</b></td>
155       <td valign="top">UI for CreateWOR</td>
156       <td valign="top">~p6258c/adm/lib</td>
157     </tr>
158     <tr>
159       <td valign="top"><b>CreateHelpDeskUI</b></td>
160       <td valign="top">UI for CreateHelpDesk</td>
161       <td valign="top">~p6258c/adm/lib</td>
162     </tr>
163     <tr>
164       <td valign="top"><b>Tk::MyText</b></td>
165       <td valign="top">Subclasses the Tk TextUndo<br>
166 widget. This is used for the description fields in both CreateWOR<br>
167 and CreateHelpDesk. The subclassing was necessary in order to<br>
168 provide for a modified callback that allows us to tell when the<br>
169 widget has text and thus can set the Submit button to active.</td>
170       <td valign="top">~p6258c/adm/lib</td>
171     </tr>
172   </tbody>
173 </table>
174
175 <p>Additionally there is a cqtool script itself which is a command
176 line interface/driver that was initially used to test the
177 functionality provided in the above modules. It has been oriented to
178 be the primary interface to this functionality. The thought is that
179 UCMWB will fire up cqtool in the background at start up and then, if
180 and when it's functionality is needed, UCMWB will feed commands to the
181 already running cqtool.</p>
182
183 <p>When run interactively, cqtool prompts for a command. It will also
184 read commands from $ARGV, execute them and exit. So, in a sense,
185 cqtool works like cleartool.</p>
186
187 <p>If you type help at the prompt the following is displayed:</p>
188
189 <div class=code><pre>
190 cqtool Version 0.9: Program to talk to Clearquest
191
192 Valid commands are:
193
194 createwor:                      Create a new WOR
195 createhd:                       Create a new Help Desk Ticket
196 clone &lt;wor&gt;                       Clones a WOR
197 link &lt;parent wor&gt; &lt;child wor&gt;       Link a parent WOR to a child
198 WOR
199 exit|quit:                      Exits cqtool
200 help:                           This display
201 usage:                          Displays command line usage
202 version:                        Displays version of cqtool
203 </pre></div>
204
205 <p>createwor and createhd both are Perl/Tk applications that interact
206 with Clearquest and display a GUI that obtains the necessary and
207 required fields to create a WOR or a Helpdesk ticket. Note, only the
208 bare minimum fields are available. IOW I didn't implement the whole UI
209 that Clearquest provides. Instead it's just enough to create the WOR
210 or Helpdesk ticket.</p>
211
212 <p>cqtool pays attention to a few environment variables:</p>
213
214 <dl>
215   <dt><b>CQ_DBSET</b></dt>
216
217     <dd>Set to the dbset name of the Clearquest database to work with.
218     For testing purposes set this to XTST3. Production would be
219     RANCQ</dd>
220
221   <dt><b>CQ_USER</b></dt>
222
223     <dd>Name of the user to log in as. By default $USER is used. For
224     testing purposes set this to "ccadm" (for the XTST3 database that
225     is)</dd>
226
227   <dt><b>CQ_PASSWORD</b></dt>
228
229     <dd>Set to the password for CQ_USER. For testing purposes set this
230     to "ccadm" (for the XTST3 database that is). If this is not set
231     then cqtool prompts for a password.</dd>
232 </dl>
233
234 <p>So then, with the proper environment variables set one can:</p>
235
236
237 <div class=code><pre>
238 $ cqtool help
239 cqtool Version 0.9: Program to talk to Clearquest
240
241 Valid commands are:
242
243 createwor:                      Create a new WOR
244 createhd:                       Create a new Help Desk Ticket
245 clone &lt;wor&gt;                       Clones a WOR
246 link &lt;parent wor&gt; &lt;child wor&gt;       Link a parent WOR to a child
247 WOR
248 exit|quit:                      Exits cqtool
249 help:                           This display
250 usage:                          Displays command line usage
251 version:                        Displays version of cqtool
252 </pre></div>
253
254 <p>or</p>
255
256 <div class=code><pre>
257 $ cqtool createwor
258 </pre></div>
259
260 <p>Oh, where is cqtool? Well for now it's in ~p6258c/adm/cq/cqtool
261 (libs in ~p6258c/adm/lib/*).</p>
262                 </div>
263                 <nav class="page-navigation entry-navigation pagination content-nav">
264                   <ul class="page-navigation-list">
265
266                     <li class="page-navigation-list-item page-navigation-prev"><a rel="prev" href="http://defaria.com/blogs/Status/2007/10/cqtalk.html" title="cqtalk">Previous entry</a></li>
267
268
269                     <li class="page-navigation-list-item page-navigation-next"><a rel="next" href="http://defaria.com/blogs/Status/2007/10/ucmwb-added-cre.html" title="UCMWB enhancements/Helpdesk Tickets">Next entry</a></li>
270
271                   </ul>
272                 </nav>
273                 <!--
274 <aside id="zenback" class="zenback feedback">
275   Please paste Zenback script code here.
276 </aside>
277 -->
278                 
279                 
280               </article>
281             </div>
282             <aside class="widgets related" role="complementary">
283               <nav class="widget-search widget">
284   <div class="widget-content">
285     <form method="get" id="search" action="http://defaria.com/mt/mt-search.cgi">
286       <div>
287         <input type="text" name="search" value="" placeholder="Search...">
288
289         <input type="hidden" name="IncludeBlogs" value="8">
290
291         <input type="hidden" name="limit" value="20">
292         <button type="submit" name="button">
293           <img alt="Search" src="/mt/mt-static/support/theme_static/rainier/img/search-icon.png">
294         </button>
295       </div>
296     </form>
297   </div>
298 </nav>
299 <nav class="widget-archive-category widget">
300   <h3 class="widget-header">Categories</h3>
301   <div class="widget-content">
302     
303       
304     <ul class="widget-list">
305       
306       
307       <li class="widget-list-item"><a href="http://defaria.com/blogs/Status/ameriquest/">Ameriquest (99)</a>
308       
309       
310       </li>
311       
312     
313       
314       
315       <li class="widget-list-item"><a href="http://defaria.com/blogs/Status/audience/">Audience (3)</a>
316       
317       
318       </li>
319       
320     
321       
322       
323       <li class="widget-list-item"><a href="http://defaria.com/blogs/Status/broadcom/">Broadcom (76)</a>
324       
325       
326       </li>
327       
328     
329       
330       
331       <li class="widget-list-item"><a href="http://defaria.com/blogs/Status/gpdb/">GPDB (35)</a>
332       
333       
334       </li>
335       
336     
337       
338       
339       <li class="widget-list-item"><a href="http://defaria.com/blogs/Status/general-dynamics/">General Dynamics (61)</a>
340       
341       
342       </li>
343       
344     
345       
346       
347       <li class="widget-list-item"><a href="http://defaria.com/blogs/Status/general-electric/">General Electric (13)</a>
348       
349       
350       </li>
351       
352     
353       
354       
355       <li class="widget-list-item"><a href="http://defaria.com/blogs/Status/hewlett-packard/">Hewlett Packard (13)</a>
356       
357       
358       </li>
359       
360     
361       
362       
363       <li class="widget-list-item"><a href="http://defaria.com/blogs/Status/lynuxworks/">LynuxWorks (162)</a>
364       
365       
366       </li>
367       
368     
369       
370       
371       <li class="widget-list-item"><a href="http://defaria.com/blogs/Status/pqa/">PQA (35)</a>
372       
373       
374       </li>
375       
376     
377       
378       
379       <li class="widget-list-item"><a href="http://defaria.com/blogs/Status/salira/">Salira (79)</a>
380       
381       
382       </li>
383       
384     
385       
386       
387       <li class="widget-list-item"><a href="http://defaria.com/blogs/Status/tellabs/">Tellabs (2)</a>
388       
389       
390       </li>
391       
392     
393       
394       
395       <li class="widget-list-item"><a href="http://defaria.com/blogs/Status/texas-instruments/">Texas Instruments (31)</a>
396       
397       
398       </li>
399       
400     </ul>
401       
402     
403   </div>
404 </nav>
405   
406
407 <nav class="widget-archive-dropdown widget">
408   <h3 class="widget-header">Archives</h3>
409   <div class="widget-content">
410     <select>
411       <option>Select a Month...</option>
412     
413       <option value="http://defaria.com/blogs/Status/2016/02/">February 2016</option>
414     
415   
416     
417       <option value="http://defaria.com/blogs/Status/2014/09/">September 2014</option>
418     
419   
420     
421       <option value="http://defaria.com/blogs/Status/2014/04/">April 2014</option>
422     
423   
424     
425       <option value="http://defaria.com/blogs/Status/2014/03/">March 2014</option>
426     
427   
428     
429       <option value="http://defaria.com/blogs/Status/2013/02/">February 2013</option>
430     
431   
432     
433       <option value="http://defaria.com/blogs/Status/2012/09/">September 2012</option>
434     
435   
436     
437       <option value="http://defaria.com/blogs/Status/2012/08/">August 2012</option>
438     
439   
440     
441       <option value="http://defaria.com/blogs/Status/2012/05/">May 2012</option>
442     
443   
444     
445       <option value="http://defaria.com/blogs/Status/2012/04/">April 2012</option>
446     
447   
448     
449       <option value="http://defaria.com/blogs/Status/2012/02/">February 2012</option>
450     
451   
452     
453       <option value="http://defaria.com/blogs/Status/2012/01/">January 2012</option>
454     
455   
456     
457       <option value="http://defaria.com/blogs/Status/2011/10/">October 2011</option>
458     
459   
460     
461       <option value="http://defaria.com/blogs/Status/2011/07/">July 2011</option>
462     
463   
464     
465       <option value="http://defaria.com/blogs/Status/2010/09/">September 2010</option>
466     
467   
468     
469       <option value="http://defaria.com/blogs/Status/2010/08/">August 2010</option>
470     
471   
472     
473       <option value="http://defaria.com/blogs/Status/2010/04/">April 2010</option>
474     
475   
476     
477       <option value="http://defaria.com/blogs/Status/2010/03/">March 2010</option>
478     
479   
480     
481       <option value="http://defaria.com/blogs/Status/2010/02/">February 2010</option>
482     
483   
484     
485       <option value="http://defaria.com/blogs/Status/2009/05/">May 2009</option>
486     
487   
488     
489       <option value="http://defaria.com/blogs/Status/2009/04/">April 2009</option>
490     
491   
492     
493       <option value="http://defaria.com/blogs/Status/2008/07/">July 2008</option>
494     
495   
496     
497       <option value="http://defaria.com/blogs/Status/2008/05/">May 2008</option>
498     
499   
500     
501       <option value="http://defaria.com/blogs/Status/2008/04/">April 2008</option>
502     
503   
504     
505       <option value="http://defaria.com/blogs/Status/2008/03/">March 2008</option>
506     
507   
508     
509       <option value="http://defaria.com/blogs/Status/2008/02/">February 2008</option>
510     
511   
512     
513       <option value="http://defaria.com/blogs/Status/2008/01/">January 2008</option>
514     
515   
516     
517       <option value="http://defaria.com/blogs/Status/2007/12/">December 2007</option>
518     
519   
520     
521       <option value="http://defaria.com/blogs/Status/2007/11/">November 2007</option>
522     
523   
524     
525       <option value="http://defaria.com/blogs/Status/2007/10/">October 2007</option>
526     
527   
528     
529       <option value="http://defaria.com/blogs/Status/2007/09/">September 2007</option>
530     
531   
532     
533       <option value="http://defaria.com/blogs/Status/2007/08/">August 2007</option>
534     
535   
536     
537       <option value="http://defaria.com/blogs/Status/2007/07/">July 2007</option>
538     
539   
540     
541       <option value="http://defaria.com/blogs/Status/2007/06/">June 2007</option>
542     
543   
544     
545       <option value="http://defaria.com/blogs/Status/2007/05/">May 2007</option>
546     
547   
548     
549       <option value="http://defaria.com/blogs/Status/2007/04/">April 2007</option>
550     
551   
552     
553       <option value="http://defaria.com/blogs/Status/2007/03/">March 2007</option>
554     
555   
556     
557       <option value="http://defaria.com/blogs/Status/2007/01/">January 2007</option>
558     
559   
560     
561       <option value="http://defaria.com/blogs/Status/2006/12/">December 2006</option>
562     
563   
564     
565       <option value="http://defaria.com/blogs/Status/2006/11/">November 2006</option>
566     
567   
568     
569       <option value="http://defaria.com/blogs/Status/2006/10/">October 2006</option>
570     
571   
572     
573       <option value="http://defaria.com/blogs/Status/2006/09/">September 2006</option>
574     
575   
576     
577       <option value="http://defaria.com/blogs/Status/2006/07/">July 2006</option>
578     
579   
580     
581       <option value="http://defaria.com/blogs/Status/2006/06/">June 2006</option>
582     
583   
584     
585       <option value="http://defaria.com/blogs/Status/2006/05/">May 2006</option>
586     
587   
588     
589       <option value="http://defaria.com/blogs/Status/2006/04/">April 2006</option>
590     
591   
592     
593       <option value="http://defaria.com/blogs/Status/2006/03/">March 2006</option>
594     
595   
596     
597       <option value="http://defaria.com/blogs/Status/2006/02/">February 2006</option>
598     
599   
600     
601       <option value="http://defaria.com/blogs/Status/2006/01/">January 2006</option>
602     
603   
604     
605       <option value="http://defaria.com/blogs/Status/2005/12/">December 2005</option>
606     
607   
608     
609       <option value="http://defaria.com/blogs/Status/2005/11/">November 2005</option>
610     
611   
612     
613       <option value="http://defaria.com/blogs/Status/2005/10/">October 2005</option>
614     
615   
616     
617       <option value="http://defaria.com/blogs/Status/2005/09/">September 2005</option>
618     
619   
620     
621       <option value="http://defaria.com/blogs/Status/2005/08/">August 2005</option>
622     
623   
624     
625       <option value="http://defaria.com/blogs/Status/2005/07/">July 2005</option>
626     
627   
628     
629       <option value="http://defaria.com/blogs/Status/2005/06/">June 2005</option>
630     
631   
632     
633       <option value="http://defaria.com/blogs/Status/2005/05/">May 2005</option>
634     
635   
636     
637       <option value="http://defaria.com/blogs/Status/2005/04/">April 2005</option>
638     
639   
640     
641       <option value="http://defaria.com/blogs/Status/2005/03/">March 2005</option>
642     
643   
644     
645       <option value="http://defaria.com/blogs/Status/2005/02/">February 2005</option>
646     
647   
648     
649       <option value="http://defaria.com/blogs/Status/2005/01/">January 2005</option>
650     
651   
652     
653       <option value="http://defaria.com/blogs/Status/2004/12/">December 2004</option>
654     
655   
656     
657       <option value="http://defaria.com/blogs/Status/2004/09/">September 2004</option>
658     
659   
660     
661       <option value="http://defaria.com/blogs/Status/2004/08/">August 2004</option>
662     
663   
664     
665       <option value="http://defaria.com/blogs/Status/2004/07/">July 2004</option>
666     
667   
668     
669       <option value="http://defaria.com/blogs/Status/2004/06/">June 2004</option>
670     
671   
672     
673       <option value="http://defaria.com/blogs/Status/2004/05/">May 2004</option>
674     
675   
676     
677       <option value="http://defaria.com/blogs/Status/2004/04/">April 2004</option>
678     
679   
680     
681       <option value="http://defaria.com/blogs/Status/2004/03/">March 2004</option>
682     
683   
684     
685       <option value="http://defaria.com/blogs/Status/2004/02/">February 2004</option>
686     
687   
688     
689       <option value="http://defaria.com/blogs/Status/2004/01/">January 2004</option>
690     
691   
692     
693       <option value="http://defaria.com/blogs/Status/2003/12/">December 2003</option>
694     
695   
696     
697       <option value="http://defaria.com/blogs/Status/2003/11/">November 2003</option>
698     
699     </select>
700   </div>
701 </nav>
702     
703   
704
705 <div class="widget-syndication widget section">
706   <div class="widget-content">
707     <p><img src="http://defaria.com/mt/mt-static/images/status_icons/feed.gif" alt="Subscribe to feed" width="9" height="9" /> <a href="http://defaria.com/blogs/Status/atom.xml">Subscribe to this blog's feed</a></p>
708
709   </div>
710 </div>
711
712             </aside>
713           </div>
714         </div>
715         <footer id="footer" role="contentinfo">
716           <div id="footer-inner">
717             <div id="footer-content">
718   <nav role="navigation">
719           <ul>
720             <li><a href="http://defaria.com/blogs/Status/">Home</a></li>
721
722
723           </ul>
724         </nav>
725
726   <p class="license">&copy; Copyright 2016.</p>
727   <p class="poweredby">Powered by <a href="http://www.movabletype.org/">Movable Type</a></p>
728 </div>
729           </div>
730         </footer>
731       </div>
732     </div>
733     <script src="http://defaria.com/mt/mt-static/jquery/jquery.min.js"></script>
734     <script src="http://defaria.com/blogs/Status/mt-theme-scale2.js"></script>
735   </body>
736 </html>