No jdev-comp/subcomp checking for non-jdev reports jdev_excrep
authorJakub Lehotsky <jlehotsky@netbeans.org>
Wed, 23 Mar 2016 16:49:13 +0100
branchjdev_excrep
changeset 6305ae4c35b41902
parent 6304 3a1c39928e77
child 6306 716926e4e7c0
child 6307 2a2536ffd9ea
No jdev-comp/subcomp checking for non-jdev reports
logger/uihandlerserver/src/java/org/netbeans/web/IssuezillaRedirect.java
     1.1 --- a/logger/uihandlerserver/src/java/org/netbeans/web/IssuezillaRedirect.java	Wed Mar 23 16:40:29 2016 +0100
     1.2 +++ b/logger/uihandlerserver/src/java/org/netbeans/web/IssuezillaRedirect.java	Wed Mar 23 16:49:13 2016 +0100
     1.3 @@ -106,7 +106,9 @@
     1.4  
     1.5              public TransactionResult runQuery(EntityManager em) throws Exception {
     1.6                  Report report = em.getReference(Report.class, id);
     1.7 -                if (!PersistenceUtils.isJDevExistingComponent(report.getComponent(), report.getSubcomponent())) {
     1.8 +                if (("JDEV".equals(report.getReportType()) ||
     1.9 +                    "SRG".equals(report.getReportType())) &&
    1.10 +                    !PersistenceUtils.isJDevExistingComponent(report.getComponent(), report.getSubcomponent())) {
    1.11                      errors.add("This report has incorrect component or subcomponent, please update it before reporting.");
    1.12                      return TransactionResult.ROLLBACK;
    1.13                  }