| Commit message (Collapse) | Author | Age | Lines |
|
|
|
|
| |
we no longer need some of the hardcoded oxfordshire Open311 overrides so
remove them
|
|
|
|
|
| |
If an Open311 update has a customer_reference property then add that to
the metadata for the problem.
|
| |
|
| |
|
|
|
|
|
|
| |
A move between fixed states (presumably from fixed-user to fixed-council)
should not count as a state change for the purposes of generating comment
text from templates.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Open311 specification has two values for a report's status:
- open: it has been reported.
- closed: it has been resolved.
FixMyStreet previously mapped 'closed' to 'fixed - council', but this
has been causing issues with Open311 endpoints that want to mark a FMS
report as closed but not fixed. The mySociety Open311 additions
introduce extended statuses, some of which represent a 'closed' state
e.g. duplicate, no_further_action, but there are times when a report
should simply be closed without any indication why - for example, if
open311-adapter is being used to integrate with a council system which
has a closed state not represented by the extended statuses. Marking a
report as 'closed' on a council system and displaying that as 'fixed'
on the FixMyStreet front end is not an ideal situation.
This commit changes the mapping of the Open311 'closed' status to the
'closed' FMS state when extended_statuses is enabled.
|
|
|
|
|
|
|
|
|
|
| |
As Oxfordshire uses local time and not UTC use that when calling the get
update script. Also handle a date with a timezone being passed on the
server side.
And add some tests in for the oxfordshire open311 endpoint
Fixes mysociety/fixmystreet-commercial#1062
|
|
|
|
|
| |
If we assume that any body with can_be_devolved set is probably a mix of
Open311/email, we can ignore any email address contacts for such a body.
|
| |
|
|
|
|
| |
[Stevenage] Make sure Other included, like East Herts.
|
|
|
|
| |
If no text, photo, or state change, hide the update from display.
|
|
|
|
|
| |
Add a more helpful error message when a problem fetched over Open311 is
rejected for problems with the date.
|
|
|
|
|
|
|
| |
Response templates won't be triggered unless the problem state or
external status code is changed.
Fixes #2075
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously, an update's problem_state was set via an Open311 update if:
* the update timestamp was equal or greater to the report's last update;
* the new state was visible, and not equal to the report's current state;
* the update wouldn't change the report from a fixed state to another fixed state;
* (Oxfordshire) the update wouldn't change the report from any open state to Open.
It would also set the report's state to match if the report was currently visible.
This mostly worked, but could lead to issues if e.g. the report started life in
a non-confirmed state (e.g. we pulled it in already fixed from an external
source), as then the update did not record its state and the update display got
confused as to the state history. However it did mean there wasn't confusion if
a later update than the Open311 update was made on the site itself.
This new code will set an update's problem_state if:
* the new state is visible;
* the update wouldn't change the report from a fixed state to another fixed state;
* (Oxfordshire) the update wouldn't change the report from any open state to Open.
It will also set the report's state to match if the report is currently
visible, changing state, and the update timestamp is equal or greater to the
report's last update.
So when the report state changes is unchanged, all the conditions still apply,
but the update's problem_state is set more often (it will be set regardless of
whether the timestamps align, or whether the state matches the report's current
state).
This could theoretically lead to issues elsewhere, e.g. if an update is left on
a report on FixMyStreet and then an Open311 update is pulled in later (but with
an earlier timestamp) that changes the state, the report state will not be
updated due to the later update being made, though the Open311 update will list
the state change, and then the later update might say it changed it back (if it
recorded the current state in its problem_state), even though it technically
did not. I think this issue is less worrying than the current situation, which
can state that a random update has fixed a report when it was the previous
update that did, and there will always be such issues with multiple sources of
truth for a report status. An alternative would be to allow the Open311 update
to override.
|
|/
|
|
|
|
|
|
|
| |
If a body has a `fetch_all_reports` setting in the extra metadata then
all reports are fetched over Open311 and processed regardless of age.
This is useful for bodies where the API endpoint always returns all the
reports as it suppresses the error messages you would otherwise get
about reports with invalid dates.
|
| |
|
|
|
|
|
|
| |
If we've pulled in a report and an update from an external source,
both may have exactly the same timestamp, and we do want to record
the problem_state in that case.
|
|
|
|
|
|
|
|
| |
FMS uses the Contact->email field for the Open311 service code,
and the Contact->category field is the user-friendly service name.
The wrong value was being compared previously, resulting in all
fetched problems being assigned to the 'Other' category.
|
|
|
|
| |
Certain endpoints can be slow, so fetch fewer reports at a time.
|
|
|
|
| |
Also adds script for fetching the last 24hrs of reports
|
| |
|
| |
|
|
|
|
|
|
|
| |
When pulling reports in over Open311 it's sometimes useful to be able to
accept reports with Easting/Northing rather than latitude/longitude.
This adds an option to GetServiceRequests to convert them as they
come in.
|
| |
|
|
|
|
|
|
|
| |
If the Open311 endpoint provides the external_status_code field
in servicerequestupdates.xml output, it’s stored in each comment’s
extra field as well as the problem’s extra field. This will make it
possible to trigger response templates based on this value.
|
|
|
|
|
| |
We do need to store them, so that the sending knows which fields are being
requested, but we do not want them output to the client at all.
|
|
|
|
|
| |
Add a per body configuration option to allow Open311 updates to contain
only a status change, rather than emitting a warning when this happens.
|
|
|
|
|
|
| |
This is part of the integration with our open311-adapter. The automated
property indicates that it's an expected value but either it's going to
be set by the server, or appear as a hidden field.
|
|
|
|
|
|
|
|
|
|
| |
This enables the display of existing reports from the back end on FMS
if the body is configured to do this.
Reports will not be created if they are missing an id, a lat or a long,
if the lat/long is outside the area covered by the body, if there is
already a report with a matching id, or if we can't parse out the
request time.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bristol's Open311 endpoint still seems to be returning empty metadata
for some services that claim to have metadata. They have made changes to
their published services since the change was made to exclude their
endpoint, which is causing issues for new reports.
Rather than exclude their endpoint entirely from being updated, this
commit just silences the noisy error message for Bristol.
Reverts the change made in 491eb26e4.
|
| |
|
|
|
|
|
|
|
| |
If an Open311 service request update with an empty description field is
received and there is a matching ResponseTemplate for the problem's
category & state (and it's marked as auto-response) then the text from
that ResponseTemplate will be used for the created update.
|
| |
|
| |
|
|
|
|
| |
Store a schema object on FixMyStreet::DB instead.
|
| |
|
|
|
|
|
| |
A new 'state' column replaces confirmed and deleted, allowing
categories to be unconfirmed, confirmed, deleted or inactive.
|
| |
|
| |
|
| |
|
|
|
|
| |
For mysociety/FixMyStreet-Commercial#766.
|
|
|
|
|
| |
We have seen e.g. an endpoint that is returning 'serviceAttributes' as
the child of 'attributes', rather than 'attribute'.
|
|
|
|
| |
The service code could be "0".
|
| |
|
|
|
|
|
| |
Parse the XML in such a way other parts of the code do not have to worry
about single-value folding or the like.
|
|
|
|
|
| |
Even when we ask for a specific range of dates, we sometimes get given
more in the response.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The following modules had bugs that have been fixed for working in
recent perls:
* List::MoreUtils
* Guard
* PadWalker
* aliased
* URI
* Convert::NLS_DATE_FORMAT
The CGI module was removed from core in 5.20, so include it in the
snapshot (I don't think it's actually used, but is a dependency).
"{" needs to be escaped in regular expressions, and ~~ should not be
used.
Fix some tests that expect e.g. a certain hash ordering, to use sorted
output or better comparisons.
|
|
|
|
| |
Fixes #1337.
|