aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/DB
Commit message (Collapse)AuthorAgeLines
* Merge branch '694-summary-string-template-tidy'Matthew Somerville2016-05-25-30/+0
|\
| * Move processed_summary_string function to templateMatthew Somerville2016-05-24-30/+0
| | | | | | | | Fixes #694.
* | Warnfix if belongs_to_body called with no string.Matthew Somerville2016-05-24-2/+3
|/
* Remove some unused cobrands.Matthew Somerville2016-04-20-51/+40
|
* Add PNG image support.Matthew Somerville2016-04-08-8/+8
| | | | | | | Store image type along with hash in photo column, and use that when outputting images / generating URLs. Make sure all public photo URL generation goes through appropriate functions, and change temp URLs so the filename can be output directly from the list.
* Show right body user form value for fixed reports.Matthew Somerville2016-03-31-2/+15
| | | | | The form element contains 'fixed', so we need to strip the user/council part of the actual state. Fixes #1369.
* [Angus] SOAP interface/send method for Angus CRMDave Arter2016-03-29-1/+1
|
* Remember user's last anonymous state.Matthew Somerville2016-03-04-0/+10
| | | | | If a user is logged in, use their last report/update to set the default anonymity state.
* Only load images from disk when needed.Matthew Somerville2016-02-23-2/+2
| | | | Fixes #1337.
* Helper function for fetching database secret.Matthew Somerville2016-02-19-0/+12
|
* Exclude update alerts from summary alert counts.Matthew Somerville2016-02-09-0/+8
| | | | | | There might be the odd update alert we are interested in (those not auto-signed up for as part of report or update creation), but they will be rare.
* Prerequisites (new modules, db, config).Matthew Somerville2016-01-22-2/+8
|
* Factor multiple photo details into nicer function.Matthew Somerville2016-01-12-23/+56
| | | | | Remove get_photo_params, which only looked at the first photo, make explicit when we're doing that using `.first`.
* Remove most passing of Catalyst to PhotoSet.Matthew Somerville2016-01-12-6/+4
|
* [fixmystreet.com] Don't show app step if used app.Matthew Somerville2016-01-06-1/+2
| | | | Fixes #1305.
* Remove risk of infinite loop in PhotoSet.Matthew Somerville2015-12-16-1/+1
| | | | | | Use a separate attribute for data direct from a database row when creating a PhotoSet, so that data will always contain one or more photo IDs.
* Fix cobrand restriction of My/Nearby.Matthew Somerville2015-12-15-12/+15
| | | | | | | | | | | | 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.
* Move main bin scripts to separate packages.Matthew Somerville2015-12-02-688/+14
| | | | Maintain old location wrappers.
* Remove many uses of mySociety::Config.Matthew Somerville2015-12-02-7/+7
|
* Move from Moose to Moo in non-App code.Matthew Somerville2015-12-02-21/+6
| | | | And create default cobrand class without all of Moose.
* Reduce use of FixMyStreet::App.Matthew Somerville2015-12-02-33/+32
| | | | Command line scripts don't need a full blown app, just database.
* Move get_photo_params to Utils::Photo.Matthew Somerville2015-12-02-4/+4
|
* Move EmailSend out of Catalyst for use elsewhere.Matthew Somerville2015-12-02-6/+24
|
* Speed up admin front page.Matthew Somerville2015-10-23-23/+31
| | | | | | | | * Don't show a categories summary unless asked via a link * Don't needlessly join in questionnaire/update summaries * Switch count(distinct()) to a subselect as it turns out select count(*) from (select distinct(user_id) from problem) temp; is a lot quicker than select count(distinct(user_id)) from problem;
* [Zurich] admin workflow changes available statesHakim Cassimally2015-10-06-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-4/+0
| | | | | | | Have moved the generation of banner text from the template into problem_as_hashref See mysociety/FixMyStreet-Commercial#672
* Add "time spent" admin logging.Hakim Cassimally2015-10-06-0/+14
| | | | | | | | | | | | | | | | | | | | | 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-9/+85
| | | | | | | This provides a ResponseTemplate model that an admin/staff user can choose from when responding to problems. For mysociety/FixMyStreet-Commercial#671.
* Add support for multiple photos per report.Hakim Cassimally2015-10-06-1/+28
| | | | | | | | For Zurich, see mysociety/FixMyStreet-Commercial#664. This commit includes a new PhotoSet class (NB: called Model:: though not really a model), should handle binary data (e.g. old style photos in database), fileids (40-char hash), and Catalyst::Upload objects.
* Merge branch '1202-improve-gettext-extract-and-more'Matthew Somerville2015-09-07-5/+2
|\
| * [fixmystreet.com] Remove unused Barnet code.Matthew Somerville2015-09-03-5/+2
| |
* | Use base URL in cobrand alert for no-body report.Matthew Somerville2015-09-03-10/+2
|/ | | | | | 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.
* Merge branch '1070-dmarc-workaround'Matthew Somerville2015-08-19-9/+3
|\
| * Add default sender to send_email_cron.Matthew Somerville2015-08-19-9/+3
| | | | | | | | | | Matches send_email, remove unneeded setting of sender in one call, and add contact name to report sent email.
* | Fix issue with ambiguous 'deleted' column lookup.Matthew Somerville2015-08-19-1/+3
| |
* | Simplify/consolidate body restriction db code.Matthew Somerville2015-08-19-17/+30
| | | | | | | | | | | | | | 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.
* | Use ResultSet/cobrand->problems where appropriate.Matthew Somerville2015-08-19-2/+2
| | | | | | | | Fixes #893.
* | Move "missing" handling to separate column.Matthew Somerville2015-08-19-12/+18
| |
* | Updates to schema from DBIx::Class loader.Matthew Somerville2015-08-19-14/+22
|/
* Fix display of warning message in report sending.Matthew Somerville2015-08-13-1/+1
|
* Speed up new_updates query execution.Matthew Somerville2015-08-13-5/+6
| | | | | | | This makes no actual change to the query (the joins are all on the same value, after all), but along with the removal of ms_current_timestamp in the previous commit massively speeds it up as the query planner realises it can do a hash join rather than a nested merge join.
* Remove ms_current_timestamp() override function.Matthew Somerville2015-08-13-32/+31
| | | | | This override is not used anywhere, it dates from a very old long-gone test script, and causes issues with database query planning.
* Improve stored procedure performance.Matthew Somerville2015-08-10-12/+0
| | | | | Add an index on the radian values, make the function stable, and switch to a full bounding box rather than a slower angle check.
* Move Latin-char-specific name check to cobrand.Matthew Somerville2015-07-31-21/+1
| | | | | Also move some UK-specific code in the same function. The specific code is still tested in report_new.t.
* Alter token logging in and timeout behaviour.Matthew Somerville2015-07-10-4/+3
| | | | | | | Restrict email_sign_in token to one day, unused confirmation tokens to one month. Used tokens will redirect to the created thing but not log in; don't log in with alert links (unsubscribe link never expires, reply link will still show "reopen" tickbox).
* Allow /ajax to be filtered by statusDave Arter2015-06-29-4/+12
| | | | | If present, the 'status' param can be set to 'open' or 'fixed' to display ensure only open or fixed reports respectively are included in the response.
* Add category filtering support to /ajax via 'category' GET paramDave Arter2015-06-29-2/+4
|
* Simpler report meta information displayZarino Zappia2015-06-29-4/+4
| | | | | Removes the italics, and breaks the wording into two separate paragraphs, at the top of the report page.
* Add hidden_states and updating functions.Hakim Cassimally2015-06-16-32/+64
| | | | To allow visible/hidden states to be manipulated at runtime.
* [Zurich] add columns to stats exportHakim Cassimally2015-03-31-0/+4
| | | | | | | | | | | | | | | - Original Report description - Amended Report description (unsure what this is) - Media URL (currently one picture, in the future 1-3 pictures) - Interface used (see open311) - Requested datetime (see open311) (seems to be same as created) - Agency sent datetime (see open311) - Updated datetime (see open311) - Council-Response - title as per https://github.com/mysociety/FixMyStreet-Commercial/issues/678