Package org.netbeans.server.uihandler.api

Examples of org.netbeans.server.uihandler.api.Issue


    public Collection<Integer> filterOpen(Collection<Integer> data) {
        data = new HashSet<Integer>(data);
        Iterator<Integer> it = data.iterator();
        while (it.hasNext()) {
            Integer bugId = it.next();
            Issue bug = getIssue(bugId);
            if (bug != null && !bug.isOpen()){
                it.remove();
            }
        }
        return data;
    }
View Full Code Here


        org.netbeans.modules.exceptions.entity.Exceptions exc =
                em.find(org.netbeans.modules.exceptions.entity.Exceptions.class, excData.getSubmitId());
        Report report = exc.getReportId();
        report.setIssueId(issuezillaId);
        em.merge(report);
        Issue issue = BugReporterFactory.getDefaultReporter().getIssue(issuezillaId);
        issue.setLastResolutionChange(new Date());

        String undirectUser = "tester";
        params.set(3, undirectUser);
        params.set(6, undirectUser);
        rec.setParameters(params.toArray());
        task = new TestLogFileTask(em, log);
        insertion = new DbInsertion(rec, thrown, task);
        insertion.start(new ExceptionsData());
        task.markFinished();
        waitIssuezillaInsertionFinished();

        result = handler.getResult();
        assertNotNull("MANY DUPLICATES FILTER - ADD COMMENT", result);
        parameters = result.getParameters();
        assertEquals(Integer.toString(issuezillaId), parameters[0].toString());
        assertEquals("default comment reporter", null, parameters[1]);
        String str = (String) parameters[3];
        assertNotNull("GENERATED MESSAGE", str);
        assertTrue(str.contains("already"));
        handler.flush();

        issue.setIssueStatus("RESOLVED");
        issue.setResolution("FIXED");
        em.getTransaction().commit();

        em.getTransaction().begin();
        assertTrue(PersistenceUtils.issueIsFixed(issuezillaId));
        assertFalse(PersistenceUtils.issueIsOpen(issuezillaId));
View Full Code Here

        org.netbeans.modules.exceptions.entity.Exceptions rootException = insert(em, session, null, null);
        rootException.getReportId().setIssueId(issuezillaId);
        em.merge(rootException);

        BugzillaReporter reporter = BugReporterFactory.getDefaultReporter();
        Issue issue = reporter.getIssue(issuezillaId);
        assertNotNull(issue);
        issue.setResolution("FIXED");
        issue.setIssueStatus("RESOLVED");
        issue.setLastResolutionChange(new Date());
        assertNull(handler.getResult());
        insert(em, ++session, null, null);
        assertNull("todays build", handler.getResult());

        insert(em, ++session, "unknown user", null);
        assertNull("guest", handler.getResult());

        insert(em, ++session, null, "");
        assertNull("empty comment", handler.getResult());

        issue.setLastResolutionChange(new Date("09/24/08"));
        issue.setTargetMilestone("7.0M1");
        insert(em, ++session, null, null);
        assertNull("old version", handler.getResult());

        issue.setTargetMilestone("6.0M9");
        isReopen = true;
        insert(em, ++session, null, null);
        isReopen = false;
        LogRecord result = handler.getResult();
        assertNotNull("newer build -> reopen", result);
View Full Code Here

        rootException.getReportId().setIssueId(issuezillaId);
        em.merge(rootException);
        assertNull("ADD TO CC", handler.getResult());

        BugzillaReporter reporter = BugReporterFactory.getDefaultReporter();
        Issue issue = reporter.getIssue(issuezillaId);
        assertNotNull(issue);
        issue.setLastResolutionChange(new Date());
        assertNull(handler.getResult());
        insert(em, ++session);
        LogRecord result = handler.getResult();
        assertNotNull("ADD TO CC", result);
View Full Code Here

                List<Integer> issueIds = PersistenceUtils.executeQuery(em, QUERY, null);
                javax.persistence.Query reportQuery = em.createNamedQuery("Report.findByIssueId");
                for (Integer issueId : issueIds) {
                    Report rootReport = null;
                    reportQuery.setParameter("issueId", issueId);
                    Issue issue = reporter.getIssue(issueId);
                    List<Report> reports = reportQuery.getResultList();

                    //find report referenced from IZ
                    if (issue == null) {
                        SYNCHRONIZATION_LOGGER.log(Level.SEVERE, "Impossible to find issue #{0}", issueId.toString());
                        continue;
                    }
                    Integer reporterSubmitId = issue.getReporterSubmitId();
                    if (reporterSubmitId != null) {
                        for (Report report : reports) {
                            if (reporterSubmitId.equals(report.getId())) {
                                rootReport = report;
                                break;
View Full Code Here

                    count++;
                    if (count % 1000 == 0) {
                        em.getTransaction().commit();
                        em.getTransaction().begin();
                    }
                    Issue iss = bzr.getIssue(report.getIssueId());
                    if (iss == null) {
                        SYNCHRONIZATION_LOGGER.log(Level.SEVERE, "not found issue for report{0}", report.getId().toString());
                        continue;
                    }
                    if (iss.getComponent() == null || iss.getSubcomponent() == null) {
                        SYNCHRONIZATION_LOGGER.log(Level.SEVERE, "null component of subcomponent for issue {0}", iss.getId().toString());
                        continue;
                    }
                    if (!iss.getComponent().equals(report.getComponent()) || !iss.getSubcomponent().equals(report.getSubcomponent())) {
                        SYNCHRONIZATION_LOGGER.log(Level.INFO, "changing report {0} FROM {1}/{2} TO {3}/{4}", new Object[]{report.getId().toString(), report.getComponent(), report.getSubcomponent(), iss.getComponent(), iss.getSubcomponent()});
                        report.setComponent(iss.getComponent());
                        report.setSubcomponent(iss.getSubcomponent());
                        em.merge(report);
                    }
                    if (iss.getDuplicateOf() != null) {
                        SYNCHRONIZATION_LOGGER.log(Level.INFO, "issue {0} was marked as duplicate of {1}", new Object[]{report.getIssueId().toString(), iss.getDuplicateOf().toString()});
                        report.setIssueId(iss.getDuplicateOf(), SynchronizeIssues.class);
                        em.merge(report);
                    }
                }
                return TransactionResult.COMMIT;
            }
View Full Code Here

    }

    @Override
    protected void setUp() throws Exception {
        super.setUp();
        Issue iss10 = BugReporterFactory.getDefaultReporter().getIssue(issueID);
        iss10.setIssueStatus("RESOLVED");
    }
View Full Code Here

TOP

Related Classes of org.netbeans.server.uihandler.api.Issue

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.