Initial add of defaria.com
[clearscm.git] / defaria.com / blogs / Status / archives / 000458.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: PQA Dynamic Lists</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/000457.html" title="AddListMember" />
16    <link rel="next" href="http://defaria.com/blogs/Status/archives/000459.html" title="Daylight Savings Time &amp; Clearcase" />
17
18    
19
20    
21
22    <script type="text/javascript" src="http://defaria.com/blogs/Status/mt-site.js"></script>
23 </head>
24 <body class="layout-one-column" onload="individualArchivesOnLoad(commenter_name)">
25    <div id="container">
26       <div id="container-inner" class="pkg">
27
28          <div id="banner">
29             <div id="banner-inner" class="pkg">
30                <h1 id="banner-header"><a href="http://defaria.com/blogs/Status/" accesskey="1">Status for Andrew DeFaria</a></h1>
31                <h2 id="banner-description">Searchable status reports and work log</h2>
32             </div>
33          </div>
34
35          <div id="pagebody">
36             <div id="pagebody-inner" class="pkg">
37                <div id="alpha">
38                   <div id="alpha-inner" class="pkg">
39
40                      <p class="content-nav">
41                         <a href="http://defaria.com/blogs/Status/archives/000457.html">&laquo; AddListMember</a> |
42                         <a href="http://defaria.com/blogs/Status/">Main</a>
43                         | <a href="http://defaria.com/blogs/Status/archives/000459.html">Daylight Savings Time & Clearcase &raquo;</a>
44                      </p>
45
46                      <a id="a000458"></a>
47                      <div class="entry" id="entry-458">
48                         <h3 class="entry-header">PQA Dynamic Lists</h3>
49                         <div class="entry-content">
50                            <div class="entry-body">
51                               <ul>
52   <li>Changed Dynamic Lists to properly handle bad data</li>
53 </ul>
54                            </div>
55                            <div id="more" class="entry-more">
56                               <h2>Dynamic Lists and Bad Data</h2>
57
58 <p>I now have pqamerge properly creating Dynamic Lists. In the past I would call SetFieldChoiceList, which would allow validate and commit to work, but which wouldn't actually add a member to the Dynamic List. I've since changed that.</p>
59
60 <p>The first problem I hit was that Clearquest would treat "1.A" as the same as "1.a". So when pqamerge attempted to add "1.a" to the Dynamic List it would fail. I needed to compare ignoring case. In Perl usually one uses a regex for that and specifies "i" to ignore case.</p>
61
62 <div class="code"><pre>
63 if ($var =~ /^$pattern$/i) {
64   &lt;<i>matched ignoring case</i>&gt;
65 } # if
66 </pre></div>
67
68 <p>But some of the values of the various Dynamic Lists contain regex meta characters (e.g. "?" or "(") which caused me problems. I've fixed those now.</p>
69
70 <div class="code"><pre>
71 if ("\L$var\E" eq "\L$pattern\E") {
72   &lt;<i>matched ignoring case</i>&gt;
73 } # if
74 </pre></div>
75
76 <p>The above basically says to downshift characters between the "\L" and the "\E". Then a regular eq is used so as to avoid problems with interpreting regex meta characters.</p>
77                            </div>
78                         </div>
79                         <p class="entry-footer">
80                            <span class="post-footers">Posted by  on October 22, 2005  1:50 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000458.html">Permalink</a>
81                         </p>
82                      </div>
83
84                      
85
86                      
87                   </div>
88                </div>
89             </div>
90          </div>
91       </div>
92    </div>
93 </body>
94 </html>