diff options
author | Struan Donald <struan@exo.org.uk> | 2011-11-16 10:45:17 +0000 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2011-11-16 10:45:17 +0000 |
commit | 6fcada7050449a2181a73fda444b2f2c7ec94236 (patch) | |
tree | d3de5b275a169860cc8b88cc9d1fc979235c8284 /bin/send-reports | |
parent | 02ba98ebd01d8bbcbf322dfb94931717b633cfaa (diff) |
work round issues with one particular CRM and open311
Diffstat (limited to 'bin/send-reports')
-rwxr-xr-x | bin/send-reports | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/bin/send-reports b/bin/send-reports index 648e83192..4da44f9f7 100755 --- a/bin/send-reports +++ b/bin/send-reports @@ -273,7 +273,17 @@ while (my $row = $unsent->next) { $open311->endpoints( { services => 'Services', requests => 'Requests' } ); } - my $resp = $open311->send_service_request( $row, \%h, $contact->email ); + # required to get round issues with CRM constraints + if ( $row->council =~ /2218/ ) { + $row->user->name( $row->user->id . ' ' . $row->user->name ); + } + + my $resp = $open311->send_service_request( $row, \%h, $contact->ema + + # make sure we don't save user changes from above + if ( $row->council =~ /2218/ ) { + $row->discard_changes(); + } if ( $resp ) { $row->external_id( $resp ); |