Details
-
Bug
-
Resolution: Timed out
-
Low
-
3.4.4, 3.7.0
-
None
-
Severity 3 - Minor
-
Description
Few issues with REST endpoint /rest-service/reviews-v1/{reviewid}/remind:
- incomplete documentation: https://docs.atlassian.com/fisheye-crucible/latest/wadl/crucible.html#rest-service:reviews-v1:id:remind - it doesn't explain how the request should be structured and what details are returned in the response
- recipients list must be provided in the request. Lack of them causes NPE, see below.
- intention of this endpoint is to send reminders to incomplete participants, so recipients parameter should be optional. Lack of parameter should result in all incomplete reviewers being notified
UI accepts email addresses too, perhaps same should be allowed in the REST call?actually not, this endpoint sends email to incomplete participants, it would make no sense to accept email address. https://docs.atlassian.com/fisheye-crucible/latest/wadl/fecru.html#rest-service-fecru:share-content-v1:share should be used in such case
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
- is duplicated by
-
CRUC-6848 Remind REST API Call issue
- Closed