Project

General

Profile

Actions

Errores #156

closed

Update mandatory attributes in each design class

Added by Jesús Freire almost 7 years ago. Updated almost 7 years ago.

Status:
Cerrada
Priority:
Normal
Assignee:
Target version:
Start date:
06/05/2018
Due date:
06/10/2018
% Done:

100%

Estimated time:
4:00 h
Spent time:
Puntos de historia:
8

Description

Update mandatory attributes in each design class using the following SQL sentence modifing the word ATCL by ecah name of the design class:

update atcl set oblig=true where coinob='00000053' and subcla='CD' and vaclob='ATCL' and codatr in (select codatr from atcl where coinob='00000053' and subcla='CL' and vaclob in (select coobme from objm where tiobme='CL' and coobpa in (select coinob from objm where tiobme='CD' and coobme='ATCL')));

Actually, there are 85 design classes.
Update mandatory attributes in each unique key of each design class.
Upload PL/SQL procedures to test resources directory

Actions #1

Updated by Jesús Freire almost 7 years ago

  • Status changed from Nueva to En curso

The following function has been created on the file atcl.oblig.sql of the test resources directory:

CREATE OR REPLACE FUNCTION hacer_obligatorios_atributos_clases_diseno()
  RETURNS void AS
$BODY$
DECLARE
    CLASE RECORD;
BEGIN
    FOR CLASE IN SELECT * FROM OBJM WHERE TIOBME='CD'
    LOOP
        UPDATE ATCL SET OBLIG=true WHERE 
            COINOB=(SELECT COINOB FROM OBJM WHERE TIOBME='CD' AND COOBME='OBJM') AND
            SUBCLA='CD' AND
            VACLOB=CLASE.COOBME AND
            CODATR IN (
                SELECT CODATR FROM ATCL WHERE 
                    COINOB=(SELECT COINOB FROM OBJM WHERE TIOBME='CD' AND COOBME='OBJM') AND
                    SUBCLA='CL' AND
                    VACLOB IN (
                        SELECT COOBME FROM OBJM WHERE
                            TIOBME='CL' AND
                            COOBPA=(SELECT COINOB FROM OBJM WHERE TIOBME='CD' AND COOBME=CLASE.COOBME)
                    )
                );
    END LOOP;
END
$BODY$
LANGUAGE plpgsql

Actions #2

Updated by Jesús Freire almost 7 years ago

  • Status changed from En curso to Resuelta
  • % Done changed from 20 to 90
  • Estimated time changed from 8:00 h to 4:00 h
  • Puntos de historia changed from 8 to 4

The following function has been created on the file atcl.formato.clave.sql of the test resources directory for update unique keys attributes format from design classes:

CREATE OR REPLACE FUNCTION dar_formato_atributos_claves_fichero()
  RETURNS void AS
$BODY$
DECLARE
    CLAVE RECORD;
    ATRIBUTO RECORD;
BEGIN
    FOR CLAVE IN SELECT * FROM OBJM WHERE TIOBME='CL'
    LOOP
        FOR ATRIBUTO IN SELECT * FROM ATCL WHERE
            COINOB=(SELECT COINOB FROM OBJM WHERE TIOBME='CD' AND COOBME='OBJM') AND
            SUBCLA='CL' AND
            VACLOB=CLAVE.COOBME
            LOOP
                UPDATE ATCL SET 
                    FORMATO=
                        (
                        SELECT FORMATO FROM ATCL WHERE 
                            COINOB=(SELECT COINOB FROM OBJM WHERE TIOBME='CD' AND COOBME='OBJM') AND
                            SUBCLA='CD' AND
                            VACLOB=(SELECT COOBME FROM OBJM WHERE COINOB=CLAVE.COOBPA) AND
                            CODATR=ATRIBUTO.CODATR
                        ),
                    LONGITUD=
                        (
                        SELECT LONGITUD FROM ATCL WHERE 
                            COINOB=(SELECT COINOB FROM OBJM WHERE TIOBME='CD' AND COOBME='OBJM') AND
                            SUBCLA='CD' AND
                            VACLOB=(SELECT COOBME FROM OBJM WHERE COINOB=CLAVE.COOBPA) AND
                            CODATR=ATRIBUTO.CODATR
                        )
                WHERE 
                    COINOB=(SELECT COINOB FROM OBJM WHERE TIOBME='CD' AND COOBME='OBJM') AND
                    SUBCLA='CL' AND
                    VACLOB=CLAVE.COOBME AND
                    CODATR=ATRIBUTO.CODATR;
            END LOOP;
    END LOOP;
END
$BODY$
LANGUAGE plpgsql

Actions #3

Updated by Jesús Freire almost 7 years ago

  • Project changed from Selene J2EE Webapp to Selene Wrapper
  • Target version deleted (0.0.1)
Actions #4

Updated by Jesús Freire almost 7 years ago

  • Translation missing: en.field_sprint changed from 51 to 57
Actions #5

Updated by Jesús Freire almost 7 years ago

  • Target version set to 0.0.8
Actions #6

Updated by Jesús Freire almost 7 years ago

  • Due date set to 06/08/2018
  • Status changed from Resuelta to Cerrada
  • % Done changed from 90 to 100
  • Puntos de historia changed from 4 to 0
Actions #7

Updated by Jesús Freire almost 7 years ago

  • Status changed from Cerrada to Resuelta
Actions #8

Updated by Jesús Freire almost 7 years ago

  • Description updated (diff)
  • Status changed from Resuelta to En curso
Actions #9

Updated by Jesús Freire almost 7 years ago

  • Status changed from En curso to Resuelta
  • % Done changed from 100 to 90

Applied in changeset selene-wrapper|r654.

Actions #10

Updated by Jesús Freire almost 7 years ago

  • Due date changed from 06/08/2018 to 06/10/2018
  • Status changed from Resuelta to Cerrada
  • % Done changed from 90 to 100
  • Puntos de historia changed from 0 to 8
Actions

Also available in: Atom PDF