Skip to content

Commit

Permalink
[N/land] Fetch category & group updates from Alloy
Browse files Browse the repository at this point in the history
  • Loading branch information
nephila-nacrea committed Dec 4, 2024
1 parent f19e371 commit 09ebd76
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions perllib/Open311/UpdatesBase.pm
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,18 @@ sub _process_update {
$request->{extras}{detailed_information} )
: $p->unset_extra_metadata('detailed_information');
}

# Category & group
# TODO Do we want to check that category and group match?
if ( my $category = $request->{extras}{category} ) {
my $contact

Check warning on line 233 in perllib/Open311/UpdatesBase.pm

View check run for this annotation

Codecov / codecov/patch

perllib/Open311/UpdatesBase.pm#L233

Added line #L233 was not covered by tests
= $body->contacts->search( { category => $category } )->first;
$p->category($category) if $contact;
}

if ( my $group = $request->{extras}{group} ) {
$p->set_extra_metadata( group => $group );

Check warning on line 239 in perllib/Open311/UpdatesBase.pm

View check run for this annotation

Codecov / codecov/patch

perllib/Open311/UpdatesBase.pm#L239

Added line #L239 was not covered by tests
}
}

my $comment = $self->schema->resultset('Comment')->new(
Expand Down

0 comments on commit 09ebd76

Please sign in to comment.