Progetto

Generale

Profilo

Actions

Supporto #307

chiusa

Pulizia questionari

Aggiunto da Diego Sorrentino oltre 5 anni fa. Aggiornato oltre 5 anni fa.

Stato:
Chiuso
Priorità:
Urgent
Assegnato a:
Inizio:
21-11-2019
Scadenza:
22-11-2019
% Completato:

100%

Tempo stimato:

Descrizione

Nel db sono presenti molti questionari con risposte sballate, vanno sistemati o, in certi casi, eliminati:

quindi:
  1. CAMBIARE obs_place = 4 DOVE tot_floors = 413 and obs_place = 100
  2. CAMBIARE obs_place = 4 DOVE obs_place = 100
  3. CAMBIARE fireplace = 264 DOVE fireplace = 263
  4. ELIMINARE questionari con adverted = 0;
  5. ELIMINARE questionari con tutte le risposte a 0 e adverted = 31
  6. CAMBIARE risposte impostando tutti i valori a *1 DOVE adverted = 32;
  7. CAMBIARE risposte impostando tutti i valori a *1 DOVE lo stesso e' a 0 o NULL (o annullarlo in caso la risposta non fosse presente in quella versione di questionario)
Actions #1

Aggiornato da Diego Sorrentino oltre 5 anni fa

  • % Completato modificata da 0 a 50

impostate insieme, nella versione di sviluppo, tutte le modifiche da fare sul db.
va cambiata la procedura di salvataggio cosi' fa fissare le modifiche per ogni questionario compilato

Actions #2

Aggiornato da Diego Sorrentino oltre 5 anni fa

  • Stato modificata da Nuovo a In lavorazione
  • % Completato modificata da 50 a 90

modificato metodo php che memorizza i questionari nel db aggiungendo il reset dei campi, al valore di default, quando trova un valore non valido

Actions #3

Aggiornato da Diego Sorrentino oltre 5 anni fa

  • Stato modificata da In lavorazione a Chiuso
  • % Completato modificata da 90 a 100

aggiornato db con le seguenti modifiche (le riporto tutte, visto che sono molte e molto invasive)

delete from questionnaire where mcs = -8 and obs_place = 100;
update questionnaire set obs_place = 4 where floor = 402 and obs_place = 100;
update questionnaire set obs_place = 4 where tot_floors = 413 and obs_place = 100;
update questionnaire set obs_place = 4 where obs_place = 100;

update questionnaire set fireplace = 264 where fireplace = 263;

delete from questionnaire where adverted = 0;

delete from questionnaire where
    intensity = 0 and
    e_reaction = 0 and
    equilibry = 0 and
    animal_reac = 0 and
    lights = 0 and
    plates = 0 and
    ornaments = 0 and
    doors = 0 and
    liquids = 0 and 
    pictures = 0 and
    closet = 0 and
    plants = 0 and
    acous_effect = 0 and
    when_acous = 0 and
    where_acous = 0 and 
    adverted = 31;

update questionnaire set
    intensity = 41 ,
    e_reaction = 51 ,
    equilibry = 71 ,
    animal_reac = 91 ,
    lights = 101,
    plates = 111 ,
    ornaments = 121,
    doors = 131 ,
    liquids = 141 , 
    pictures = 151 ,
    closet = 161 ,
    plants = 191 ,
    acous_effect = 201 ,
    when_acous = 211 ,
    where_acous = 221
where
    intensity = 0 and
    e_reaction = 0 and
    equilibry = 0 and
    animal_reac = 0 and
    lights = 0 and
    plates = 0 and
    ornaments = 0 and
    doors = 0 and
    liquids = 0 and 
    pictures = 0 and
    closet = 0 and
    plants = 0 and
    acous_effect = 0 and
    when_acous = 0 and
    where_acous = 0 and 
    adverted = 32;

update questionnaire set intensity = 41 where intensity = 40;
update questionnaire set intensity = 41 where intensity = 0;
update questionnaire set e_reaction = 51 where e_reaction = 0;
update questionnaire set equilibry = 71 where equilibry = 0;
update questionnaire set animal_reac = 91 where animal_reac = 0;
update questionnaire set lights = 101 where lights = 0;
update questionnaire set ornaments = 121 where ornaments = 0;
update questionnaire set liquids = 141 where liquids = 0;
update questionnaire set pictures = 151 where pictures = 0;
update questionnaire set closet = 161 where closet = 0;
update questionnaire set plants = 191 where plants = 0;
update questionnaire set acous_effect = 201 where acous_effect = 0;
update questionnaire set when_acous = 211 where when_acous = 0;
update questionnaire set where_acous = 221 where where_acous = 0;
update questionnaire set buildings = 271 where buildings = 0;
update questionnaire set damages = 231 where damages = 0;
update questionnaire set walls = 241 where walls = 0;
update questionnaire set roofs = 251 where roofs = 0;
update questionnaire set fireplace = 261 where fireplace = 0;

update questionnaire set intensity_duration = NULL where intensity_duration = 0 and version = 2;

update questionnaire set when_acous_end = 291 where when_acous_end = 0;
update questionnaire set when_acous_end = 291 where when_acous_end is null and version in (2,3);

update questionnaire set acous_intensity = 301 where acous_intensity = 0;
update questionnaire set acous_intensity = 301 where acous_intensity is null and version in (2,3);

update questionnaire set acous_similitude = 1001 where acous_similitude = 0;
update questionnaire set acous_similitude = 1001 where acous_similitude is null and version in (2,3);

update questionnaire set light_effects = NULL where light_effects = 0 and version = 2;
update questionnaire set light_effects = 331 where light_effects = 0 and version = 3;
update questionnaire set light_effects = 331 where light_effects is null and version = 3;

update questionnaire set light_effects_similitude = NULL where light_effects_similitude = 0 and version = 2;
update questionnaire set light_effects_similitude = 341 where light_effects_similitude = 0 and version = 3;
update questionnaire set light_effects_similitude = 341 where light_effects_similitude IS NULL and version = 3;

update questionnaire set light_effects_start = NULL where light_effects_start = 0 and version = 2;
update questionnaire set light_effects_start = 351 where light_effects_start = 0 and version = 3;
update questionnaire set light_effects_start = 351 where light_effects_start is null and version = 3;

update questionnaire set light_duration = NULL where light_duration = 0 and version = 2;
update questionnaire set light_duration = 361 where light_duration = 0 and version = 3;
update questionnaire set light_duration = 361 where light_duration is null and version = 3;

update questionnaire set light_color = NULL where light_color = 0 and version = 2;
update questionnaire set light_color = 371 where light_color = 0 and version = 3;
update questionnaire set light_color = 371 where light_color is null and version = 3;

Actions

Esporta su Atom PDF