diff options
author | Dave Arter <davea@mysociety.org> | 2016-08-18 14:29:41 +0100 |
---|---|---|
committer | Dave Arter <davea@mysociety.org> | 2016-08-22 11:26:36 +0100 |
commit | d55d835fa6e95db47badd5b57172d9accda2eec8 (patch) | |
tree | 8d90539c9253b6acca072b2cb246440b5b6ca6fa /perllib/FixMyStreet/Cobrand/UK.pm | |
parent | b296995e528da8f25328fdba7df71b4f50909e41 (diff) |
Allow searching for reports with ref: prefix in postcode field
Searches the `id` and `external_id` fields.
This takes you directly to the report if only a single report matches, otherwise
a disambiguation page is shown.
For mysociety/fixmystreetforcouncils#16
Diffstat (limited to 'perllib/FixMyStreet/Cobrand/UK.pm')
-rw-r--r-- | perllib/FixMyStreet/Cobrand/UK.pm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/UK.pm b/perllib/FixMyStreet/Cobrand/UK.pm index e60b673b4..206f4bb1e 100644 --- a/perllib/FixMyStreet/Cobrand/UK.pm +++ b/perllib/FixMyStreet/Cobrand/UK.pm @@ -392,5 +392,9 @@ sub link_to_council_cobrand { } } +sub lookup_by_ref_regex { + return qr/^\s*(\d+)\s*$/; +} + 1; |