aboutsummaryrefslogtreecommitdiffstats
path: root/t
Commit message (Collapse)AuthorAgeLines
...
* | display the contents of report's extra field in adminStruan Donald2018-04-26-0/+76
|/ | | | | | | | 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
* Merge branch 'collideoscope-anew'Matthew Somerville2018-04-26-4/+36
|\
| * Add way of validating data in report_form_extras.Matthew Somerville2018-04-23-4/+31
| |
| * Add new report hooks for cobrand report munging.Matthew Somerville2018-04-23-0/+1
| | | | | | | | | | One to alter the category after initially set, one to change any details of the report before saving to the database.
| * Have only one bodies_to_list variable.Matthew Somerville2018-04-23-0/+1
| |
| * Add a cobrand hook to table dashboard generation.Matthew Somerville2018-04-23-0/+3
| | | | | | | | This allows a cobrand to categorise the reports however it wishes.
* | Sign up inspector, not creator, on inspection.Matthew Somerville2018-04-25-2/+2
| |
* | Use explicit ordering for test queryDave Arter2018-04-23-1/+1
| | | | | | | | This hopefully works around some odd test failures on Travis.
* | Don’t trigger response templates unless problem state changesDave Arter2018-04-23-0/+12
| | | | | | | | | | | | | | Response templates won't be triggered unless the problem state or external status code is changed. Fixes #2075
* | [Open311] avoid spurious warning when params are undefStruan Donald2018-04-17-6/+49
| | | | | | | | | | | | | | 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.
* | [Open311] correctly handle one word names when splittingStruan Donald2018-04-17-0/+6
|/ | | | | | 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.
* [Oxfordshire] Fix admin exor download page.Matthew Somerville2018-04-16-4/+4
| | | | | 07906f40 changed the HTML date input form, but did not update the server parsing of the format.
* Merge branch 'mapit-proxy-api-key'Matthew Somerville2018-04-13-0/+13
|\
| * Provide API key to MapIt proxy if present.Matthew Somerville2018-04-12-0/+13
| |
* | Don’t send alert emails when archiving old reportsDave Arter2018-04-12-0/+35
|/
* Merge branch 'open311-update-problem-state'Matthew Somerville2018-04-11-1/+1
|\
| * [Open311] Generally store update state.Matthew Somerville2018-04-10-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | admin UI to configure fetch_all_problems Open311 optionStruan Donald2018-04-11-0/+39
| | | | | | | | | | | | 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.
* | [Open311] fetch_all option for open311 problem fetchingStruan Donald2018-04-11-0/+41
| | | | | | | | | | | | | | | | | | 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.
* | Add link to edit current report in adminDave Arter2018-04-11-0/+25
|/ | | | | | | 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] Add BathNES map type & assetsDave Arter2018-04-10-0/+1
| | | | | | | | | | | | | 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.
* [fixmystreet.com] Stop non-council email sign-up.Matthew Somerville2018-04-09-2/+4
| | | | 100% false positives so far.
* Correctly assign problem categories in GetServiceRequestsDave Arter2018-04-04-2/+3
| | | | | | | | 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.
* Add test for update name in HTML part of email.Matthew Somerville2018-04-04-3/+2
|
* Default to last two hours in GetServiceRequestsDave Arter2018-04-04-5/+21
| | | | Also adds script for fetching the last 24hrs of reports
* [Buckinghamshire] Add grit bins/street lighting asset layersDave Arter2018-04-03-0/+1
|
* limit problem body to single body if requiredStruan Donald2018-04-03-2/+23
| | | | | | Add a single_body_only form value to reports that contains the name of the only body to send the problem to. If the name doesn't match any of the valid bodies for the report then send to all.
* test for multiple bodies for one contactStruan Donald2018-04-03-0/+108
| | | | | test to check creating a new report for a category for which there are multiple bodies
* test that options pass from body to fetching problemsStruan Donald2018-03-29-0/+30
|
* optionally convert from EPSG:27700 to WGS84 on report importStruan Donald2018-03-29-1/+40
| | | | | | | 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.
* fix timezone problems with offline inspector commentsStruan Donald2018-03-29-1/+5
| | | | | | | Comments added offline by an inspector set the time in JavaScript using a UTC epoch. We need to add the FMS timezone to this so it's in the timezone the database expects for timestamps otherwise it's incorrect when we fetch it back out
* Don’t show empty ‘provide extra detail’ sectionDave Arter2018-03-29-0/+46
| | | | | | Hides the empty “Help <council> resolve your problem quicker” section of the new report form if report metas for the selected category are all hidden fields.
* Trigger response templates based on external_status_codeDave Arter2018-03-29-0/+41
|
* Add external_status_code to ResponseTemplate admin editing formsDave Arter2018-03-29-0/+51
|
* Fetch and store external_status_code in GetServiceRequestUpdatesDave Arter2018-03-28-0/+48
| | | | | | | 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.
* Store server_set automated, but ignore for input.Matthew Somerville2018-03-21-104/+73
| | | | | 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.
* [fixmystreet.com] Add admin page to list refused.Matthew Somerville2018-03-21-0/+26
|
* send easting/northing over open311 if send_notpinpointed and no map/postcodeStruan Donald2018-03-21-22/+50
| | | | | | If the map was not clicked and we don't have a postcode we should still send the easting and northing extra attributes if send_notpinpointed is set.
* Store contributed-as data.Matthew Somerville2018-03-20-1/+30
| | | | | Store if the report/update was created by someone using the contributed-as dropdown, and use that information to perhaps not send report-sent emails.
* Add browser testing symlink to `t` directory.Matthew Somerville2018-03-19-0/+1
|
* Merge branch '2023-bad-open311-dates'Matthew Somerville2018-03-16-0/+13
|\
| * Truncate dates in Open311 output to the second.Matthew Somerville2018-03-15-0/+13
| | | | | | | | This fixes #2023 by removing the comma.
* | Merge branch 'rutland-integration'Struan Donald2018-03-15-0/+580
|\ \
| * | permit blank updates to be fetched over Open311Struan Donald2018-03-15-0/+48
| | | | | | | | | | | | | | | Add a per body configuration option to allow Open311 updates to contain only a status change, rather than emitting a warning when this happens.
| * | Deal with 'automated' Open311 service attributes.Struan Donald2018-03-15-0/+90
| | | | | | | | | | | | | | | | | | 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.
| * | send multiple photos over open311Struan Donald2018-03-15-0/+81
| | | | | | | | | | | | | | | | | | | | | | | | Per cobrand configurable option to send multiple photos over open311 instead of just a single one. Does this by sending multiple media_url parameters in the POST body. The default remains to send the first photo associated with a report.
| * | [Rutland] cobrand files for RutlandStruan Donald2018-03-15-0/+60
| | | | | | | | | | | | | | | Web and email template changes, CSS plus cobrand file with open311 config
| * | fetch new problems over open311Struan Donald2018-03-15-0/+301
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | [Zurich] Fix typo causing crash on /report/ajaxDave Arter2018-03-15-0/+9
| | |
* | | Fix JSON-encoding crash on /report/ajaxDave Arter2018-03-15-0/+6
|/ /