Uploaded image for project: 'Crucible'
  1. Crucible
  2. CRUC-6847

Remind REST API Issue

    XMLWordPrintable

Details

    Description

      Few issues with REST endpoint /rest-service/reviews-v1/{reviewid}/remind:

      At the moment, sending a message with no recipients causes NPE:

      2015-01-28 20:03:30,218 ERROR [qtp1707903278-783 ] fisheye ExceptionLoggerUtil-logError - Exception thrown during REST request:null User: null Referrer:null
      java.lang.NullPointerException
              at com.atlassian.crucible.spi.impl.DefaultReviewService$37.doInTransaction(DefaultReviewService.java:2495)
              at com.atlassian.crucible.spi.impl.DefaultReviewService$37.doInTransaction(DefaultReviewService.java:2482)
              at com.atlassian.fisheye.spi.impl.DefaultTxTemplate.execute(DefaultTxTemplate.java:76)
              at com.atlassian.crucible.spi.impl.DefaultReviewService.remindIncompleteReviewers(DefaultReviewService.java:2482)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              ...
              at $Proxy185.remindIncompleteReviewers(Unknown Source)
              at com.atlassian.fecrurestplugin.crucible.RestReviewService.remindIncompleteReviewers(RestReviewService.java:1944)
      

      providing list of usernames in recipients field allows to send notifications, list of users who were found in the system and were sent a message is returned in the response. E.g. having /tmp/remind.xml file:

      <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
      <remindMessage>
          <message>Reminder message text.</message>
          <recipients>pswiecicki</recipients>
          <recipients>test</recipients>
      </remindMessage>
      

      one can send reminder with:

      curl -H "Content-Type: application/xml" --user $USER:$PASS --data @/tmp/remind.xml http://FISHEYE_HOST/rest-service/reviews-v1/<REVIEW_PERM_ID>/remind
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              a35259e21a89 Ben Gooding
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: