USGS-WiM/whispersservices

Update content of service request notification

Closed this issue · 8 comments

Source for service response notifications is not source of the response. Case in point https://whispers.usgs.gov/event/200986 Deana is listed as the source of the service request response (i.e. yes/no/maybe), however it should be Barb. I think this source just needs to be updated to point to the username for from the field whispers_servicerequest.response_by_id . I don't think this a reversion, but just something we found now.

@JChipault can you confirm that this is an issue with the notification, not the display on the event details page?

Confirmed. It's the "source" that can be viewed in the dashboard that's off. Here's an example from the test site. User abilenetest can't set a service request response so they shouldn't be the source.
image

Looking at the example of Event 200986 in the production client, I see this:
image

Yet when I look at the actual response from the API, I see this:
image

The response_by field has a value of 19, which is Barb. So this problem seems like just a front end field mapping mismatch, where the front end is displaying the service request created_by information, not response_by information.

Oh, I glanced over the bit about notifications. I'll look at that.

Ah yep, it was the notification create code, I had source set to modified_by, not response_by.

Fixed deployed in test environment.

I checked it out on the test site and it looks good. Thanks!

Fix deployed in production environment.