aboutsummaryrefslogtreecommitdiffstats
path: root/t
Commit message (Collapse)AuthorAgeLines
* Merge branch '700-auto-emails'Matthew Somerville2014-05-16-19/+134
|\
| * Update all email templates with new text.Myfanwy Nixon2014-05-16-19/+134
| | | | | | | | And FixMyStreet.com specific open questionnaire page.
* | Add MAPIT_GENERATION variable, to pin whitelist.Matthew Somerville2014-05-16-1/+3
| | | | | | | | | | | | Otherwise, when MapIt Global is updated, the 'point' lookup, as it only returns the current generation by default, might no longer return the areas present in the whitelist.
* | Test dashboard CSV export more thoroughlyDave Arter2014-04-30-3/+13
|/ | | | | | | | | | | Instead of counting the number of lines output by dashboard CSV export, the content is parsed as CSV and the number of rows present is checked. Also includes a problem report that's split across multiple lines, testing the fix for mysociety/FixMyStreet-Commercial#494 introduced in d75e161c151c4f1e6dced24eae3170e01f9b7ba6. Closes #780.
* Merge branch 'improve-contact-form'Struan Donald2014-04-17-1/+110
|\
| * Add a who are you trying to contact option to contact formStruan Donald2014-04-15-1/+110
| | | | | | | | | | | | | | | | | | | | | | In order to try and cut down on people mistakingly using this form to try and contact their council all some 'who are you trying to contact' options to the form that display appropriate messaged unless the 'FMS team option is selected. Add the validation code for this in the cobrand module. Fixes #41
* | alter pave url sent to analytics on report completionStruan Donald2014-04-16-1/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to allow us to do funnel analysis in google analytics we need to send a differnt page url when a user completes a report. To do this we add a report_created=1 to the query string on either the report page or the report confirmation page for logged in and confirm by email users respectively. There's a bit of complication as we don't want to set a session cookie everywhere as that will break caching so we set a stash variable, although if the user is logged in this is controlled by a variable in the flash as there is already a session cookie at this point. also, removes the code that sends an event upon report completion as this was no use for funnel analysis.
* | create westminster council so report_new test can run standaloneStruan Donald2014-04-16-0/+1
| | | | | | | | | | | | | | The test relies on a body for westminster council existing which is crated in an earlier test if you run the whole test suite. However it's not present if you run only this test against an empty database so add it to the list of created bodies.
* | Add Cobrand config to include update date in email alertsStruan Donald2014-04-08-0/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | This is useful for sites where the updates aren't published on the site so you need a bit more context in the email alerts. Add inlude_time_in_update_alerts to default cobrand, off as default If this is set then the date is added after the name string in the email, passing in 'alert' as the type to dt_prettify in order to allow the cobrand to format it accordingly. This does require pulling out the alert confirmed time from the database in the send_alerts code where it wasn't before.
* | Allow comments to be confirmed with no confirmationStruan Donald2014-04-08-0/+79
| | | | | | | | | | | | | | | | Add never_confirm_updates setting to cobrand that, when set to 0 means that comments are confirmed with no confirmation step. Essentially behaves as it would if the user was logged in. Also add a flag to the flash that indicates the comment was accepted to you can display a message on the report page if required
* | Add some overrides to zurich tests to stop failureStruan Donald2014-04-08-0/+4
|/ | | | Make sure mapit_id_whitelist set for tests that submit
* Mock a date for dashboard testsHakim Cassimally2014-04-07-1/+5
| | | | | | | Fixes #365 (how appropriate) by mocking datetime to allow the dashboard test's assumptions (that we're not so near beginning of year that a report from X days ago isn't still in same year) to hold.
* Update old-style open311 script to use bodies.Matthew Somerville2014-04-07-36/+33
| | | | Add some comments to the top of the open311 bin scripts.
* Use local DateTimes in dashboard and its tests.Matthew Somerville2014-04-07-6/+7
| | | | | Otherwise oddities arise due to summer time differences putting a BST now-6d23h time behind a UTC now+1s-1w.
* Change default email indentation to none.Matthew Somerville2014-03-17-17/+17
| | | | | This is very old, no-one seems to want/need it any more, and more than one reuser does not want it. Fixes #715.
* Fix slight regression in cf20c709, to still match all UK cobrands.Matthew Somerville2014-03-13-0/+1
|
* Add test for de47a7f.Matthew Somerville2014-03-12-15/+63
| | | | | | This tests that the default string used by the old-style Open311 update code if there is no incoming string and the report is marked fixed, is translated.
* Merge remote branch 'origin/sweden-rebase'Matthew Somerville2014-03-11-0/+200
|\ | | | | | | | | | | | | Conflicts: bin/update-schema locale/sv_SE.UTF-8/LC_MESSAGES/FixMyStreet.po perllib/FixMyStreet/DB/Result/Body.pm
| * Alter Open311 description to only include English on FixMyStreet.Jon Kristensen2014-03-11-0/+2
| | | | | | | | This could be made cobrand-customisable in future.
| * Bring back open311-update-reports, GetUpdates.pm and getupdates.tJon Kristensen2014-03-11-0/+198
| | | | | | | | | | | | This commit reverses the "Remove unused Open311 GetUpdates code." commit. FixaMinGata, the Swedish FixMyStreet cobrand, is still using open311-update-reports.
* | Export reports as CSV on /dashboardHakim Cassimally2014-03-10-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Provide a button to download the details and text of reports at the second "Look up" button on /dashboard. Provides acknowledged, fixed, closed dates by parsing updates. Fixes #692 (and mysociety/FixMyStreet-Commercial#399) Email is not shown, and name honours anonymous flag: as /dashboard is accessible to people who are from_body (who still do not see anon-users name and email in the FMS web app.) A basic test is provided as per Zurich's similar report.
* | Re-enable dashboard testsHakim Cassimally2014-03-10-519/+521
| | | | | | | | | | | | | | | | The tests have been commented out due to long-running failure. It looks like the failures happen if working copy MAPIT_URL is not pointing at live site. Have updated with an override_config setting this to live site (which is obviously suboptimal, but seems to be widespread practice across t/ at the moment.)
* | [Hart] basic Hart cobrandingHakim Cassimally2014-03-05-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Originally copied from template of Bromley code, substituting logo, council ID, geolocation data, and renaming .scss variables etc. (NB: this was a bad idea. As per notes/cobranding.txt, should have started with less copying of files, as this required more cleanup. Bromley's code has some particularities, like smaller map, split First/Last name fields and so on. The current branch has been rebased to present a slightly idealised picture of the process.) (Includes contributions by @davea and @stevenday) * Some code cleanup and added is_two_tier * Add Hart-specific links to footer * Shift FMS nav out of the main header * Update styling to follow design more closely * Flip nav colours to better indicate links * Make header banner entire width of the page * Stretch footer bg to entire width of page * Add top-level nav links * Correct header height on mobile * Correct wording of top menu item * Remove FMS logo from top of page * Shift top level nav to correct position * Invert media query so IE8 displays header properly * hide folding triangle, as makes no sense on this cobrand * Some more renaming of Bromley to Hart * Treat Hart the same as Bromley in the JS * Whitespace/formatting fixes * Basic test for cobrand * Javascript #map_box fixes * Make sure #map_box is not in desk-only * ensure there is only single map (one .wrapper only) * colour tweaks * Fix example places (postcode, spelling) * Basic FAQ text * Set Zoom level 3 * CSS/HTML/JS tweaks removing Bromley customizations * Switch templates to put navigation in footer, as FMS.com does * remaining HTML/CSS changes for large map * replace favicon * move site-logo scss to one place * make small logo transparent
* | Merge branch 'issues/677-open311-errors-on-comment-processing'Matthew Somerville2014-02-27-9/+25
|\ \
| * | Fix uncommon Open311 errors on processing updates.Hakim Cassimally2014-02-27-9/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #677. The query to fetch the related alert sometimes: * retrieves no result, causing an error on $alert->id * retrieves multiple results, causing deprecation warnings (e.g. which may at some point become future errors in DBIC) This commit turns the resultset('DB::Alert')->find(...) into a search(...) and loops over the results, to suppress them.
* | | Make sure language is set early enough in email alert loop.Matthew Somerville2014-02-26-10/+28
| | | | | | | | | | | | | | | The call to set_lang_and_domain needs to happen before the first string is translated (the report state).
* | | Make sure bodies returned in consistent order.Matthew Somerville2014-02-25-2/+2
|/ /
* | Make alert_type.t test more robust.Matthew Somerville2014-02-24-4/+8
| | | | | | | | | | | | Put alerts in default cobrand, so changes to other cobrand email templates don't affect the test; and clean up at the end of the test so that it can be rerun without issue.
* | Correct subtest variable name, fix uninitialized value warning.Matthew Somerville2014-01-30-2/+2
| |
* | Don't update problem state from service request if currently hidden.Matthew Somerville2014-01-30-18/+13
| |
* | Fix test breakageHakim Cassimally2013-12-23-6/+23
| | | | | | | | for Zurich tests, count how many reports already exist as a baseline.
* | [Zurich] don't hardcode division ID in cleanup()Hakim Cassimally2013-12-23-8/+9
| |
* | [Zurich] admin template to respect closed_overdueHakim Cassimally2013-12-20-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | This value is now cached, but the template calls the function, calculating it anew, so for old reports (closed within SLA) the problem_row.html template showed these as overdue. Instead, we point the template at a function which first checks the cached value. (Attempting to roll this functionality into the .overdue() method itself caused a fair amount of collateral test breakage, and it seems safest to extract the caching function for now.) Closes https://github.com/mysociety/FixMyStreet-Commercial/issues/462
* | Merge branch 'issues/commercial/461-zurich-export-hidden-stats'Hakim Cassimally2013-12-17-11/+19
|\ \
| * | [Zurich] stats export include 'hidden'Hakim Cassimally2013-12-17-11/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See https://github.com/mysociety/FixMyStreet-Commercial/issues/461 Again, we just need to substitute the %params line (which elides hidden reports) for the less restrictive %date_params. This commit includes very basic tests for the previously untested ?export=1 functionality.
* | | Test for admin_base_url in RS::ProblemHakim Cassimally2013-12-17-0/+11
|/ / | | | | | | | | Test that the slash is added in correct place (the base URL should not have its own trailing slash).
* | [Zurich] testing - create superuser earlierHakim Cassimally2013-12-10-2/+7
| | | | | | | | So that tests pass on clean dataset such as travis...
* | [Zurich] also allow hidden reports for closed_overdueHakim Cassimally2013-12-10-2/+2
| |
* | [Zurich] fix moderated statistics to include hiddenHakim Cassimally2013-12-10-53/+127
| | | | | | | | | | | | As per comments after testing mysociety/FixMyStreet-Commercial#459, the business logic of the actual state changes is fine, but the stats do also then need to include hidden records.
* | [Zurich] log admin changesHakim Cassimally2013-12-09-0/+10
| | | | | | | | | | To allow us to infer additional stats changes requirements such as in mysociety/FixMyStreet-Commercial#459 better in future.
* | [Zurich] move mech test into override_config stanzaHakim Cassimally2013-12-09-2/+2
| | | | | | | | | | This was causing previous test failures when config != Zurich, due to expected logic not getting triggered.
* | [Zurich] test factor out cleanup() routineHakim Cassimally2013-12-09-4/+9
| |
* | [Zurich] test /admin/statsHakim Cassimally2013-12-09-0/+39
| | | | | | | | | | | | | | First test that this page is only available to superuser. Then test that the moderated and fixed stats are doing something that is (hopefully) the spec in mysociety/FixMyStreet-Commercial#459
* | [Zurich] test moderated_overdueHakim Cassimally2013-12-09-0/+43
| | | | | | | | | | | | - is set to 0 on state change within time-limit - is set to 1 on state change after time-limit - only marks overdue on first time
* | Don't display categories for deleted bodiesChris Mytton2013-11-11-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | When a body has been marked as deleted (currently only exposed in the Zurich cobrand's admin) the categories for that body should not be available on the report_new form. Prior to this change there was an error running the 'zurich-overdue-alert' script, because it wasn't expecting the 'bodies_str' field to have any entries in the format 'x|y,z', this prevents this problem from happening in the future (though it doesn't fix any existing entries with this issue).
* | If only one cobrand given, always use it.Matthew Somerville2013-11-07-32/+73
| | | | | | | | | | | | | | | | | | If the ALLOWED_COBRANDS configuration variable only contains one entry (and also work if it's a string rather than a list), always use that cobrand, no matter what the hostname is. The example Vagrantfile no longer needs the configuration changes at all.
* | Add more admin external link icons.Matthew Somerville2013-11-07-6/+6
| | | | | | | | Use a relative URL in the CSS in case it's proxied.
* | Merge branch 'multiple_emails_per_contact'Struan Donald2013-11-04-0/+46
|\ \
| * | Tests for contact with comma seperated multiple emailsStruan Donald2013-11-04-0/+46
| | |
* | | Merge branch '389-report-search-ref' of ↵Matthew Somerville2013-11-04-0/+7
|\ \ \ | |/ / |/| | | | | https://github.com/andylolz/fixmystreet into andylolz-389-report-search-ref