aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Cobrand
Commit message (Collapse)AuthorAgeLines
* Fix cobrand restriction of My/Nearby.Matthew Somerville2015-12-15-20/+36
| | | | | | | | | | | | 5c79337 simplified a bit too far, as after then a particular cobrand could in Nearby and My only filter reports to a particular body, not any other criteria. To fix this, introduce more generic functions in the default cobrand to allow more flexibility. Make sure a few tests delete their bodies fully so that new tests pass when run as part of the suite. Fixes #1289.
* Merge branch 'reduce-fixmystreet-app'Matthew Somerville2015-12-02-6/+6
|\
| * Remove many uses of mySociety::Config.Matthew Somerville2015-12-02-1/+1
| |
| * Reduce use of FixMyStreet::App.Matthew Somerville2015-12-02-5/+5
| | | | | | | | Command line scripts don't need a full blown app, just database.
* | [Zurich] Include problem extra fields in CSV downloadDave Arter2015-11-18-1/+14
| | | | | | | | | | Some categories ask the user for extra information such as street or house number; these are output in the CSV if the report includes them.
* | [Zurich] Generate the CSV header the same way as normal rowsDave Arter2015-11-18-1/+29
| |
* | [Zurich] Add 'closure status' to admin report CSVDave Arter2015-11-18-2/+4
|/
* [Zurich] Use FMS::App->get_param() instead of req->paramDave Arter2015-10-06-10/+10
|
* [Zurich] Set report's public response before sending email to userDave Arter2015-10-06-5/+5
| | | | | | | | The 'public response' to a problem was being omitted from the email sent to the user when the problem is closed, because the email was sent before the report's 'extra' field was updated with the response body text. This commit sets the public response on the problem before sending the email.
* [Zurich] Don't include external messages in a report's internal notices sectionDave Arter2015-10-06-0/+2
| | | | See mysociety/FixMyStreet-Commercial#674, mysociety/FixMyStreet-Commercial#673
* [Zurich] Display message sent to user when report is closedDave Arter2015-10-06-5/+16
| | | | | | On the report admin page, include the message the user received when the report was closed. See mysociety/FixMyStreet-Commercial#718
* [Zurich] Keep DM on report edit page after closing reportDave Arter2015-10-06-2/+2
| | | | See mysociety/FixMyStreet-Commercial#690
* [Zurich] Make sure external/competent body message is savedDave Arter2015-10-06-1/+5
| | | | | | | - Only send external_message when the problem state has the correct value - But make sure the message is preserved for editing when problem state is 'planned' See mysociety/FixMyStreet-Commercial#718
* [Zurich] UI improvements for DM/SDM report edit adminZarino Zappia2015-10-06-4/+4
| | | | | | | | | | | - Styling for "Updated!" message The message shown on form submission no longer pushes both columns down, and disappears after 5 seconds. - Make "time spent" labels inline to save space - Simplify display of report admin category dropdown - Change order of report admin inputs for Division Managers See mysociety/FixMyStreet-Commercial#690
* [Zurich] Tweaks to redirectHakim Cassimally2015-10-06-19/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See mysociety/FixMyStreet-Commercial#690 I understand redirection to summary page was introduced at ZWN's request, to make it easy to process reports and then quickly move onto the next one. However, during testing now, Tobias has mentioned this is a) slowing things down and b) confusing because it's not obvious that the report has been saved. I've tried to address (b) by adding the "Aktualisiert!" message when you are redirected. Also, for (a) I've removed the redirection from a few cases, and disabled it for superuser. If need be, I can remove redirection from more (or all) cases. Fix Official answer/Reply to user - hide label for status update on state change - correct wording on button for closure (single wording) - correct wording on label for user reply (either "Official answer" or "Reply to user" as appropriate) - Make sure the official response texts are shown for edit/static as appropriate, and test. - javascript improvements - honour public status update for Extern/Wunsch too - don't show public message for Wunsch - Ignore all other fields when rotating photos. (See mysociety/FixMyStreet-Commercial#718)
* [Zurich] additional closure statuses workHakim Cassimally2015-10-06-53/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Requirements: ============= 1: DM to be able to mark a problem as Wish, Extern, Not contactable, Hidden, Jurisdiction unknown 2: SDM to be able to mark a problem as Not contactable. 3: DM to be able to add information to such a problem, and trigger emails to external agencies, and to user, closing the problem at the same time. 4: Closed reports must be categorized as Wish/Extern/NC/Hidden/JU for statistical reporting 5: Non-closed reports must appear as open, to allow DM to see them in the list, similar to what is currently done for Ruckmeldung Ausstehend (Feedback outstanding). 5b: however "Hidden" problems must be immediately hidden from public view. Proposal: ========= a) Requirement 1 will be carried out in exactly the same way by DM. e.g. Category dropdown select b) Requirement 2 will be carried out in exactly the same way by SDM. e.g. "Not contactable" button c) BUT, for a), c), the category will be diverted to "Ruckmeldung Ausstehend" (Feedback outstanding), and metadata will be saved with the appropriate closure type. d) NOTE: this means the report will still be visible to public as "In bearbeitung" (Except for Hidden reports, as per 5b) e) The extra fields will be presented on the "Ruckmeldung Ausstehend" page, just as defined in the PDF, depending on the metadata. e.g. - Wish: Zustaendige Stelle + Message - Extern: External body + Message2 - Not contactable: (no extra info) - Hidden: (no extra info) - Jurisdiction unknown: (no extra info) f) When the DM publishes the answer (e.g. "Antwort Veroeffentlichen" button), the state will normally change to Fixed. BUT in the new cases, the metadata saved in step c) will be checked, and the report will change state to Wish/Extern/Not contactable/Hidden/Jurisdiction unknown, as appropriate. The report will now be visible/hidden as previously discussed depending on the new state. g) If the report is edited again (in /admin/report_edit) it will be in the relevant state, and any extra fields will be visible as per e). Those fields may be updated. Alternatively, the state may be changed, possibly triggering a) again, and clearing any metadata. - Fix javascript interactions 690 - show new statuses in summary - fix photos on SDM page - fix Planned => Planned+metadata transition - stop "assignation .select" js affecting templates - fix redirection for Extern and generally See mysociety/FixMyStreet-Commercial#672, mysociety/FixMyStreet-Commercial#690
* [Zurich] Updated email templatesMatthew Somerville2015-10-06-0/+10
| | | | | | | - submit-external-wish.txt includes a link with report's coordinates, template values are interpolated Conflicts: perllib/FixMyStreet/SendReport/Zurich.pm
* [Zurich] admin workflow changes available statesHakim Cassimally2015-10-06-11/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | See mysociety/FixMyStreet-Commercial#690 - external_message for Extern/Wunsch states - as per PDF mockups, the "public response" field is now editable from more states, namely: - Ruckmeldung ausstehend - Extern - Zustandigkeit unbekannt - Wunsch - Nicht kontaktierbar - Unsichtbar - test fixes NB: slight hack to reorder Zurich report_display tests As these remove 'investigating' from hidden_states, these break tests for default cobrand (the FMS::App code expects to be called once on request start, not multiple times within one test) - Not contactable button and tests for this and the similar `send_back` functionality (previously untested). NB: Unsure why we need to specify form_number=2 just for these submits, but test won't find the buttons otherwise. - Make sure SDMs' "time_spent" figure is recorded. (See mysociety/FixMyStreet-Commercial#718)
* [Zurich] new status flagsHakim Cassimally2015-10-06-0/+19
| | | | | | | Have moved the generation of banner text from the template into problem_as_hashref See mysociety/FixMyStreet-Commercial#672
* [Zurich] prevent invalid bodies_strHakim Cassimally2015-10-06-0/+2
| | | | | | | | See issue in mysociety/FixMyStreet-Commercial#663 with problems not appearing in the "Erfasst" filter. It looks like Zurich requires a single id in the `bodies_str` (like '4'), and may rely on the configuration of bodies/contacts in database to be perfect to avoid them becoming something like '4|47,48'.
* Add "time spent" admin logging.Hakim Cassimally2015-10-06-4/+50
| | | | | | | | | | | | | | | | | | | | | Mechanism is general, but current implementation only used for Zurich. - Zurich: Record time_spent field mysociety/FixMyStreet-Commercial#676 - template changes (including jQuery spinner) - backend changes to save data are made: - in log_edit, if supplied - and time on category change (and arbitrary actions) - Add update_admin_log to all paths for DM, ensuring that it gets called, while resetting the `time_spent` parameter, to make sure that there is never a duplicate record created. - Also quell warning about using DateTime values in query. - Also add (seemingly unrelated) parens to stop misparsing of OK line in questionnaire test now that DT::Format::Pg is used in Zurich cobrand See mysociety/FixMyStreet-Commercial#676
* [Zurich] Response templates for report admin.Hakim Cassimally2015-10-06-1/+3
| | | | | | | This provides a ResponseTemplate model that an admin/staff user can choose from when responding to problems. For mysociety/FixMyStreet-Commercial#671.
* [Zurich] Attach images to external bodyHakim Cassimally2015-10-06-1/+27
| | | | See mysociety/FixMyStreet-Commercial#675
* [Zurich] Make stats export media column blank if no photo.Hakim Cassimally2015-10-06-1/+4
|
* [Zurich] reduce number of pins on /reportsHakim Cassimally2015-10-06-0/+2
| | | | | For mobile, but should be done via same mechanism. See mysociety/FixMyStreet-Commercial#670
* [Zurich] Provide a setup-contacts command.Hakim Cassimally2015-10-06-0/+139
| | | | | | | | | | | | | for Zurich (and generic data), progressing mysociety/FixMyStreet-Commercial/issues/663, to provide a way for body/contact config to be consistent across dev/staging/live. Run like so: bin/setup-contacts zurich e.g. with the lower-case sigil describing the cobrand to run setup-contacts for.
* [Zurich] Vary confirmation email wording if address is confirmedHakim Cassimally2015-10-06-0/+9
| | | | See mysociety/FixMyStreet-Commercial#669
* [Zurich] all admin users can see statsHakim Cassimally2015-10-06-1/+2
| | | | | | | Admin CR4 https://github.com/mysociety/FixMyStreet-Commercial/issues/673 seems like admin_pages should be able to generate the menu, but this change also needs template change.
* [UK Councils] Add contact_email addresses to cobrandsSteven Day2015-09-17-5/+25
| | | | | | | | | This sets the contact email for: - East Sussex - Greenwich - Oxfordshire - Stevenage
* Use base URL in cobrand alert for no-body report.Matthew Somerville2015-09-03-3/+11
| | | | | | If a cobrand has a body restriction, then a report without any body won't be shown on it, so we need to make sure links to the report (in email alerts and RSS) are to the base URL, not the cobrand.
* [Bromley] Switch from Bing to OSM geocoder for BromleyDave Arter2015-08-25-30/+6
| | | | | Bing's geocoder is generating increasing numbers of erroneous results, so let's see how OSM fares instead.
* Merge branch 'bodies_str-factoring'Matthew Somerville2015-08-19-39/+12
|\
| * Simplify/consolidate body restriction db code.Matthew Somerville2015-08-19-39/+12
| | | | | | | | | | | | | | Make dashboard work properly in two-tier councils, showing reports sent to both. Create an index on the array of the bodies_str column to speed up performance, and use that throughout the code replacing all LIKE scans. This also enables a simplifying tidy of the restriction code.
* | [Bromley] Add more disambiguation rules for geocoderDave Arter2015-08-13-2/+14
|/ | | | | | Also tidies up some repeated regexes Fixes #1176
* Remove ms_current_timestamp() override function.Matthew Somerville2015-08-13-1/+1
| | | | | This override is not used anywhere, it dates from a very old long-gone test script, and causes issues with database query planning.
* Move Latin-char-specific name check to cobrand.Matthew Somerville2015-07-31-0/+33
| | | | | Also move some UK-specific code in the same function. The specific code is still tested in report_new.t.
* [MakeMyIsland] Remove MakeMyIsland cobrandDave Arter2015-07-24-12/+0
| | | | | | | | | The MakeMyIsland cobrand files now live in a separate repository: mysociety/fixmystreet-international The idea is that this repo will be checked out alongside the main fixmystreet one and cobrand-specific files symlinked into place. To this end, the commit also adds the MakeMyIsland symlinks to .gitignore.
* [Oxfordshire] Make 'open' the default state for map filterDave Arter2015-07-23-0/+2
|
* [Oxfordshire] Vary pin colours by report statusDave Arter2015-07-22-0/+8
| | | | | This also adds a new grey pin which is used by the Oxfordshire cobrand for reports that aren't the Council's responsibility.
* [Oxfordshire] Order 'all reports' page by confirmation dateDave Arter2015-07-22-0/+4
|
* [Oxfordshire] Add expected response time to report pageDave Arter2015-07-22-2/+42
| | | | | This adds a new problem_response_days sub to the Oxfordshire cobrand that provides an expected response time based on a problem's category.
* Factor out all uses of param()/params.Matthew Somerville2015-07-07-56/+56
| | | | | | | Use a central get_param and get_param_list functions dependent on whether we're after a scalar or a list (almost always a scalar). This prevents any possibility of confusion where param() could return a list, or params->{} an arrayref.
* [Greenwich] Add links to Greenwich FMS to pages on fixmystreet.comDave Arter2015-06-30-1/+1
|
* [Greenwich] Royal Borough of Greenwich front endDave Arter2015-06-30-0/+47
|
* Simplify default status filter for map pinsSteven Day2015-06-29-9/+0
|
* Combine all My Reports into a single list, allow filteringSteven Day2015-06-29-0/+8
|
* Allow cobrands to override the default 'state' filter for map pinsDave Arter2015-06-29-0/+9
|
* Allow cobrands to specify ordering on all reports pageDave Arter2015-06-29-0/+10
| | | | | Refactor the default ordering into a method on the Default cobrand which can be overridden by subclasses.
* [Bromley] Improve disambiguation for Mottingham LaneSteven Day2015-06-12-3/+2
| | | | | | | The previous commit added some disambiguation, but it didn't actually work - despite the string working when you search for it directly. This commit improves that, so we just add a postcode to the road name, which definitely works.
* [Bromley] Add more disambiguation for Bromley - Mottingham LaneSteven Day2015-06-12-3/+8
|