| Commit message (Collapse) | Author | Age | Lines |
|\ |
|
| | |
|
|/
|
|
|
|
|
| |
Add a check in the root controller `auto` to a cobrand hook that denies
access if it returns true. This goes here so that cobrands and users are
set up, which is not the case for `check_login_required`. Used to do
things like deny site access unless the user is a superuser.
|
|\ |
|
| | |
|
| | |
|
| |
| |
| |
| | |
This assumes the SendReport code will deal with the issue.
|
|/
|
|
| |
The User model now also has a created column.
|
|
|
|
|
|
|
|
| |
Display fields that are automatically filled in the contact editing form
otherwise the data is lost. Also include the automated field in the
form.
Fixes #2136
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
Return an error if an id for either a hidden update or one not
associated with the problem id is passed to the contact form.
|
| |
|
| |
|
| |
|
|\ |
|
| | |
|
| |
| |
| |
| |
| | |
The inactive report script can mark matched reports as closed for updates.
This removes the update form and signing up for updates from a report page.
|
| | |
|
| | |
|
| | |
|
|/
|
|
|
|
| |
This fixes a bug whereby a double quote in an item would not be JSON-escaped
due to being HTML-escaped first, meaning it would not parse as JSON on the
client.
|
|
|
|
|
|
|
|
| |
/ajax/closest will return ajax with details of the closest address to
the lat/lon passed in from the Bing geocoder.
Tidy up find_closest() to use overloaded string rather than passing
in whether you want a string or not.
|
| |
|
|
|
|
|
| |
Both filter categories and new report category lists went through mappings
to different data structures, which doesn't seem to be needed.
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
So that you can build functionality to add extra limitations on
to the map pins displayed. Useful for Collideoscope initially
to filter out (or in) reports from the Department of Transport's
Stats19 Data.
|
| |
| |
| |
| | |
If no text, photo, or state change, hide the update from display.
|
|/
|
|
|
|
|
|
| |
Instead of just a Yes/No display a formatted list of values in extra.
Has special handling for known fields otherwise just prints them out
dumbly.
Fixes #1809
|
|\ |
|
| | |
|
| |
| |
| |
| |
| | |
One to alter the category after initially set, one to change
any details of the report before saving to the database.
|
| | |
|
| |
| |
| |
| | |
This allows a cobrand to categorise the reports however it wishes.
|
| | |
|
| |
| |
| |
| | |
This hopefully works around some odd test failures on Travis.
|
| |
| |
| |
| |
| |
| |
| | |
Response templates won't be triggered unless the problem state or
external status code is changed.
Fixes #2075
|
| |
| |
| |
| |
| |
| |
| | |
If there was an undefined parameter passed to `_post` then generating
the debug string would generate a warning about an undefined value in a
concatenation. So, check for undefined params and substitute empty
string to avoid.
|
|/
|
|
|
|
| |
If a name only had a single word we were failing to split it and not
setting `first_name`. Also refactor splitting out to a function so the
regex is only in one place.
|
|
|
|
|
| |
07906f40 changed the HTML date input form, but did
not update the server parsing of the format.
|
|\ |
|
| | |
|
|/ |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| | |
UI to update the fetch_all_problems setting in extra for a body. This also
adds handling for extra body values in the Admin in a similar manner to the
way other body params are handled.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
|
|
|
| |
I find myself wanting to view the current report in the admin all the time -
this commit adds a link to the top of the inspector column that goes right there.
Only visible for superusers and staff users with permission to actually view the
admin.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BANES have some staff-only assets, so this adds a cobrand hook
to enable extra JS to be included on the page for staff users.
- Add custom OpenLayers build with GeoJSON support
- Add grit bins/street lights/LLPG asset layers
- Displays non-BANES street light assets in grey
- Add adopted highways to map
This means USRNs will be set for reports made by members of the public.
To keep the map simple, however, the highways layer is invisible to
non-staff users.
|
|
|
|
| |
100% false positives so far.
|
|
|
|
|
|
|
|
| |
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.
|