From bef61b3ce3b24eee1ac650af5f400a02f174dde3 Mon Sep 17 00:00:00 2001
From: Gary Williams <gary.williams@forgerock.com>
Date: Thu, 01 Mar 2012 16:57:27 +0000
Subject: [PATCH] Allow knownIssue issueid to be a string in functional tests

---
 opendj-sdk/opends/tests/staf-tests/shared/functions/utils.xml      |   13 ++++++-------
 opendj-sdk/opends/tests/staf-tests/shared/xsl/gen-tests-report.xsl |    9 ++++++++-
 2 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/opendj-sdk/opends/tests/staf-tests/shared/functions/utils.xml b/opendj-sdk/opends/tests/staf-tests/shared/functions/utils.xml
index 58a1423..6e20fc8 100755
--- a/opendj-sdk/opends/tests/staf-tests/shared/functions/utils.xml
+++ b/opendj-sdk/opends/tests/staf-tests/shared/functions/utils.xml
@@ -189,14 +189,13 @@
         </script>
 
         <script>
-          try:
-            if issueId.__class__ is PyList:
+            if issueId.__class__ is org.python.core.PyList:
                 for issue in issueId:
-                  if int(issue) not in issuesList:
-                    issuesList.append(int(issue))
+                  if issue not in issuesList:
+                    issuesList.append(issue)
             else:
-              if int(issueId) not in issuesList:
-                issuesList.append(int(issueId))
+              if issueId not in issuesList:
+                issuesList.append(issueId)
           except:
             print 'Issues list undefined. Unable to add issue %s' % issueId
         </script>
@@ -1018,7 +1017,7 @@
             done.setTextContent('%s' % nbDone)
             for issueID in issuesList:
               if issueID not in allbugs:
-                allbugs.append(int(issueID))
+                allbugs.append(issueID)
             bugs.setTextContent('%s' % allbugs)
       </script>
 
diff --git a/opendj-sdk/opends/tests/staf-tests/shared/xsl/gen-tests-report.xsl b/opendj-sdk/opends/tests/staf-tests/shared/xsl/gen-tests-report.xsl
index 6bcd1da..fcccb3e 100644
--- a/opendj-sdk/opends/tests/staf-tests/shared/xsl/gen-tests-report.xsl
+++ b/opendj-sdk/opends/tests/staf-tests/shared/xsl/gen-tests-report.xsl
@@ -483,7 +483,14 @@
               <xsl:value-of select="' '"/>
               <xsl:element name="a">
                 <xsl:attribute name="href">
-                  <xsl:value-of select="concat('http://java.net/jira/browse/OPENDS-',@id)"/>
+                  <xsl:choose>
+                    <xsl:when test="starts-with(@id,'OPENDJ')">
+                      <xsl:value-of select="concat('https://bugster.forgerock.org/jira/browse/',@id)"/>
+                    </xsl:when>
+                    <xsl:otherwise>
+                      <xsl:value-of select="concat('https://opends.dev.java.net/issues/show_bug.cgi?id=',@id)"/>
+                    </xsl:otherwise>
+                  </xsl:choose>
                 </xsl:attribute>
                 <xsl:value-of select="concat('OPENDS-',@id)"/>
               </xsl:element>

--
Gitblit v1.10.0