XMLWordPrintable

Details

    • Support Request
    • Resolution: Answered
    • Medium
    • None
    • 6.2.1
    • None

    Description

      Hello.

      I found potential bug in Jira API.

      My code is
      List<ChangeHistory> changes = ComponentAccessor.getChangeHistoryManager().getChangeHistories(ComponentAccessor.getIssueManager().getIssueObject("SITE-3"));
      for (int i = 0; i < changes.size(); i++) {
      ChangeHistory ch = changes.get;

      try

      { System.out.println("Comment +++ " + ch.getComment()); }

      catch (Exception e)

      { e.printStackTrace(); }

      System.out.println("id " + ch.getId());
      try { System.out.println("ch.getLevel +++ " + ch.getLevel()); } catch (Exception e) { e.printStackTrace(); }

      }

      In executing this code gets two exceptions:

      on line System.out.println("Comment +++ " + ch.getComment());
      exception is
      INFO] [talledLocalContainer] java.lang.IllegalArgumentException: [GenericEntity.get] "body" is not a field of ChangeGroup
      [INFO] [talledLocalContainer] at org.ofbiz.core.entity.GenericEntity.get(GenericEntity.java:210)
      [INFO] [talledLocalContainer] at org.ofbiz.core.entity.GenericEntity.getString(GenericEntity.java:399)
      [INFO] [talledLocalContainer] at com.atlassian.jira.issue.changehistory.ChangeHistory.getComment(ChangeHistory.java:154)
      [INFO] [talledLocalContainer] at name.khartn.jira.lotus.wsdl.SyncIssues.execute(SyncIssues.java:111)
      [INFO] [talledLocalContainer] at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
      [INFO] [talledLocalContainer] at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)

      and in line System.out.println("ch.getLevel +++ " + ch.getLevel());
      exception is
      [INFO] [talledLocalContainer] java.lang.IllegalArgumentException: [GenericEntity.get] "level" is not a field of ChangeGroup
      [INFO] [talledLocalContainer] at org.ofbiz.core.entity.GenericEntity.get(GenericEntity.java:210)
      [INFO] [talledLocalContainer] at org.ofbiz.core.entity.GenericEntity.getString(GenericEntity.java:399)
      [INFO] [talledLocalContainer] at com.atlassian.jira.issue.changehistory.ChangeHistory.getLevel(ChangeHistory.java:149)
      [INFO] [talledLocalContainer] at name.khartn.jira.lotus.wsdl.SyncIssues.execute(SyncIssues.java:118)
      [INFO] [talledLocalContainer] at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
      [INFO] [talledLocalContainer] at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)

      Can you fix this issue?

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              d175651cc713 ArtUrlWWW
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: