This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 112046 - Query on component doesn't work well
Summary: Query on component doesn't work well
Status: RESOLVED FIXED
Alias: None
Product: ide
Classification: Unclassified
Component: Exceptions Reporter (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Jan Horvath
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-06 13:26 UTC by pzajac
Modified: 2007-09-03 11:50 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pzajac 2007-08-06 13:26:20 UTC
I changed component of two issues from openide. After that I tried queru for openide component. The two issues were
still in the list and they contain the new component. 

Query:
http://statistics.netbeans.org/exceptions/list.do?Submit+query=Submit+query&component=openide 

Issue1:
http://statistics.netbeans.org/exceptions/detail.do?id=25

Issue2:
http://statistics.netbeans.org/exceptions/detail.do?id=23
Comment 1 Petr Blaha 2007-08-15 11:02:50 UTC
It seems as issue #112231
Comment 2 Jan Horvath 2007-09-03 11:50:57 UTC
fixed.

Directory: /logger/StrutsExceptions/src/java/org/netbeans/modules/exceptions/web/action/
========================================================================================

File [changed]: ListAction.java
Url: http://logger.netbeans.org/source/browse/logger/StrutsExceptions/src/java/org/netbeans/modules/exceptions/web/action/ListAction.java?
r1=1.4&r2=1.5
Delta lines:  +4 -3
-------------------
--- ListAction.java	5 Jun 2007 12:25:25 -0000	1.4
+++ ListAction.java	21 Aug 2007 17:16:36 -0000	1.5
@@ -69,6 +69,7 @@
         String unmapped = request.getParameter("unmapped");
         String count = request.getParameter("count");
         boolean duplicates = "on".equals(request.getParameter("duplicates")); //show only issues with one or more duplicates
+        boolean originals = "on".equals(request.getParameter("originals"));

         Map params = Utils.getParamsFromRequest(request);

@@ -89,7 +90,7 @@
         }

         if (count != null) {
-            request.setAttribute("count",PersistenceUtils.lookupInstance().countExceptions(params));
+            request.setAttribute("count",PersistenceUtils.lookupInstance().count(Exceptions.class, params, originals, duplicates));
             System.out.println("** " + request.getQueryString());
             return mapping.findForward(COUNT);
         }
@@ -103,11 +104,11 @@
 //            request.setAttribute("exceptions",duplicateFilter(PersistenceUtils.lookupInstance().find(Exceptions.class, params, duplicates)));
 //        } else {
         if ("duplicates".equals(order) || "build".equals(order)) {
-            List<Exceptions> e = new ArrayList(PersistenceUtils.lookupInstance().findExceptions(params, null));                
+            List<Exceptions> e = new ArrayList(PersistenceUtils.lookupInstance().find(Exceptions.class, params, duplicates, originals, null));                
                 Collections.sort(e, new ExceptionsComparator(order));
             request.setAttribute("exceptions", e);
         } else {
-            request.setAttribute("exceptions",PersistenceUtils.lookupInstance().findExceptions(params, order));
+            request.setAttribute("exceptions",PersistenceUtils.lookupInstance().find(Exceptions.class, params, duplicates, originals, order));
         }
 //        }
         return mapping.findForward(SUCCESS);

Directory: /logger/StrutsExceptions/web/
========================================

File [changed]: queryPage.jsp
Url: http://logger.netbeans.org/source/browse/logger/StrutsExceptions/web/queryPage.jsp?r1=1.5&r2=1.6
Delta lines:  +4 -1
-------------------
--- queryPage.jsp	5 Jun 2007 12:25:28 -0000	1.5
+++ queryPage.jsp	21 Aug 2007 17:16:37 -0000	1.6
@@ -55,7 +55,10 @@
                 <td>Show issues with one or more duplicates</td>
                 <td><input type='checkbox' name='duplicates'  onchange="countIssues();"/></td>
             </tr>
-            
+            <tr>
+                <td>Don't search in duplicates</td>
+                <td><input type='checkbox' name='originals'  onchange="countIssues();"/></td>
+            </tr>
         </table>
     </form>
     <%--

File [changed]: query.js
Url: http://logger.netbeans.org/source/browse/logger/StrutsExceptions/web/query.js?r1=1.1&r2=1.2
Delta lines:  +3 -0
-------------------
--- query.js	5 Jun 2007 12:25:27 -0000	1.1
+++ query.js	21 Aug 2007 17:16:37 -0000	1.2
@@ -61,6 +61,9 @@
         url = getOptions(url, document.getElementById("queryform").build);
         // url = getOptions(url, document.getElementById("queryform").os);
         // url = getOptions(url, document.getElementById("queryform").vm);
+        if (document.getElementById("queryform").originals.checked) {
+            url = url + "&originals=on";
+        }
         if (document.getElementById("queryform").duplicates.checked) {
             url = url + "&duplicates=on";
         }

File [changed]: issueDetail.jsp
Url: http://logger.netbeans.org/source/browse/logger/StrutsExceptions/web/issueDetail.jsp?r1=1.8&r2=1.9
Delta lines:  +1 -1
-------------------
--- issueDetail.jsp	20 Aug 2007 13:46:35 -0000	1.8
+++ issueDetail.jsp	21 Aug 2007 17:16:37 -0000	1.9
@@ -193,7 +193,7 @@
                         <td>${comment.comment}</td>
                     </tr>
                 </c:forEach>
-            <c:forEach var="duplicate" items='${exceptions.exceptionsCollection}'>
+            <c:forEach var="duplicate" items='${exceptions.duplicatesCollection}'>
                 <c:forEach var="comment" items='${duplicate.commentCollection}'>
                     <tr>
                         <th>${comment.nbuserId.name}:</th>