diff options
author | Struan Donald <struan@exo.org.uk> | 2013-01-17 17:14:26 +0000 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2013-01-17 17:14:26 +0000 |
commit | 3ce992eb742cfc75195fb482de09a92b15508e77 (patch) | |
tree | 48f3fcf38fd0ab64707ee959cc6eb8c619f290de /db | |
parent | 3f1cadfdea68a6ee4d8b3a1611597c88f9bc1d9c (diff) |
add internal review status to problems
Diffstat (limited to 'db')
-rw-r--r-- | db/schema.sql | 2 | ||||
-rw-r--r-- | db/schema_0025-add_more_statuses_to_problem.sql | 20 |
2 files changed, 16 insertions, 6 deletions
diff --git a/db/schema.sql b/db/schema.sql index 021c5561d..5bdd2a66a 100644 --- a/db/schema.sql +++ b/db/schema.sql @@ -193,6 +193,7 @@ create table problem ( or state = 'unable to fix' or state = 'not responsible' or state = 'duplicate' + or state = 'internal referral' ), lang text not null default 'en-gb', service text not null default '', @@ -343,6 +344,7 @@ create table comment ( or problem_state = 'unable to fix' or problem_state = 'not responsible' or problem_state = 'duplicate' + or problem_state = 'internal referral' ), -- other fields? one to indicate whether this was written by the council -- and should be highlighted in the display? diff --git a/db/schema_0025-add_more_statuses_to_problem.sql b/db/schema_0025-add_more_statuses_to_problem.sql index 9c49c8566..14d1b3195 100644 --- a/db/schema_0025-add_more_statuses_to_problem.sql +++ b/db/schema_0025-add_more_statuses_to_problem.sql @@ -18,6 +18,7 @@ BEGIN; or state = 'unable to fix' or state = 'not responsible' or state = 'duplicate' + or state = 'internal referral' ); @@ -36,40 +37,47 @@ BEGIN; or problem_state = 'unable to fix' or problem_state = 'not responsible' or problem_state = 'duplicate' + or problem_state = 'internal referral' ); UPDATE alert_type set item_where = 'nearby.problem_id = problem.id and problem.state in (''confirmed'', ''investigating'', ''planned'', ''in progress'', ''fixed'', ''fixed - council'', ''fixed - user'', ''closed'', - ''action scheduled'', ''not responsible'', ''duplicate'', ''unable to fix'' )' + ''action scheduled'', ''not responsible'', ''duplicate'', ''unable to fix'', + ''internal referral'')' WHERE ref = 'postcode_local_problems'; UPDATE alert_type set item_where = 'problem.state in (''confirmed'', ''investigating'', ''planned'', ''in progress'', ''fixed'', ''fixed - council'', ''fixed - user'', ''closed'' - ''action scheduled'', ''not responsible'', ''duplicate'', ''unable to fix'' )' + ''action scheduled'', ''not responsible'', ''duplicate'', ''unable to fix'', + ''internal referral'' )' WHERE ref = 'new_problems'; UPDATE alert_type set item_where = 'problem.state in (''fixed'', ''fixed - user'', ''fixed - council'')' WHERE ref = 'new_fixed_problems'; UPDATE alert_type set item_where = 'nearby.problem_id = problem.id and problem.state in (''confirmed'', ''investigating'', ''planned'', ''in progress'', ''fixed'', ''fixed - council'', ''fixed - user'', ''closed'', - ''action scheduled'', ''not responsible'', ''duplicate'', ''unable to fix'' )' + ''action scheduled'', ''not responsible'', ''duplicate'', ''unable to fix'', + ''internal referral'')' WHERE ref = 'local_problems'; UPDATE alert_type set item_where = 'problem.state in (''confirmed'', ''investigating'', ''planned'', ''in progress'', ''fixed'', ''fixed - council'', ''fixed - user'', ''closed'', - ''action scheduled'', ''not responsible'', ''duplicate'', ''unable to fix'' ) AND + ''action scheduled'', ''not responsible'', ''duplicate'', ''unable to fix'', + ''internal referral'' ) AND (council like ''%''||?||''%'' or council is null) and areas like ''%,''||?||'',%''' WHERE ref = 'council_problems'; UPDATE alert_type set item_where = 'problem.state in (''confirmed'', ''investigating'', ''planned'', ''in progress'', ''fixed'', ''fixed - council'', ''fixed - user'', ''closed'', - ''action scheduled'', ''not responsible'', ''duplicate'', ''unable to fix'' ) AND + ''action scheduled'', ''not responsible'', ''duplicate'', ''unable to fix'', + ''internal referral'' ) AND (council like ''%''||?||''%'' or council is null) and areas like ''%,''||?||'',%''' WHERE ref = 'ward_problems'; UPDATE alert_type set item_where = 'problem.state in (''confirmed'', ''investigating'', ''planned'', ''in progress'', ''fixed'', ''fixed - council'', ''fixed - user'', ''closed'', - ''action scheduled'', ''not responsible'', ''duplicate'', ''unable to fix'' ) AND + ''action scheduled'', ''not responsible'', ''duplicate'', ''unable to fix'', + ''internal referral'' ) AND areas like ''%,''||?||'',%''' WHERE ref = 'area_problems'; COMMIT; |