Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possível erro ao pedir "avaliacao" para plano de entregas com status 4 #174

Open
eritonfarias opened this issue Feb 12, 2025 · 4 comments
Assignees

Comments

@eritonfarias
Copy link

Image

@eritonfarias
Copy link
Author

A documentação leva a entender que o status 4 não pede avaliação

Image

@augusto-herrmann augusto-herrmann self-assigned this Feb 12, 2025
@eritonfarias
Copy link
Author

eritonfarias commented Feb 12, 2025

Para referência de um outro caso relacionado
Agora com status 2

URL: https://api-pgd.dth.api.gov.br/organizacao/SIAPE/26435/plano_entregas/3000000120

dados enviados

{
   "origem_unidade":"SIAPE",
   "cod_unidade_autorizadora":"26435",
   "cod_unidade_instituidora":"26435",
   "cod_unidade_executora":120,
   "id_plano_entregas":"3000000120",
   "status":2,
   "data_inicio":"2025-01-01",
   "data_termino":"2025-03-31",
   "entregas":[
      {
         "id_entrega":"6692",
         "entrega_cancelada":false,
         "nome_entrega":"Acompanhamento de convêncios",
         "meta_entrega":"100",
         "tipo_meta":"percentual",
         "data_entrega":"2025-03-31",
         "nome_unidade_demandante":"COEX/PAR",
         "nome_unidade_destinataria":"COEX/PAR"
      },
      {
         "id_entrega":"6693",
         "entrega_cancelada":false,
         "nome_entrega":"Acompanhamento PGD",
         "meta_entrega":"100",
         "tipo_meta":"percentual",
         "data_entrega":"2025-03-31",
         "nome_unidade_demandante":"COEX/PAR",
         "nome_unidade_destinataria":"COEX/PAR"
      },
      {
         "id_entrega":"6694",
         "entrega_cancelada":false,
         "nome_entrega":"Acompanhamento sistêmico dos projetos de extensão",
         "meta_entrega":"100",
         "tipo_meta":"percentual",
         "data_entrega":"2025-03-31",
         "nome_unidade_demandante":"COEX/PAR",
         "nome_unidade_destinataria":"COEX/PAR"
      },
      {
         "id_entrega":"6695",
         "entrega_cancelada":false,
         "nome_entrega":"Atendimento à alunos",
         "meta_entrega":"100",
         "tipo_meta":"percentual",
         "data_entrega":"2025-03-31",
         "nome_unidade_demandante":"COEX/PAR",
         "nome_unidade_destinataria":"COEX/PAR"
      },
      {
         "id_entrega":"6696",
         "entrega_cancelada":false,
         "nome_entrega":"Atendimento/contato com servidores",
         "meta_entrega":"100",
         "tipo_meta":"percentual",
         "data_entrega":"2025-03-31",
         "nome_unidade_demandante":"COEX/PAR",
         "nome_unidade_destinataria":"COEX/PAR"
      },
      {
         "id_entrega":"6697",
         "entrega_cancelada":false,
         "nome_entrega":"Cadastro de documentos estágio e aprendizagem",
         "meta_entrega":"100",
         "tipo_meta":"percentual",
         "data_entrega":"2025-03-31",
         "nome_unidade_demandante":"COEX/PAR",
         "nome_unidade_destinataria":"COEX/PAR"
      },
      {
         "id_entrega":"6698",
         "entrega_cancelada":false,
         "nome_entrega":"Controle de documentos e arquivos",
         "meta_entrega":"100",
         "tipo_meta":"percentual",
         "data_entrega":"2025-03-31",
         "nome_unidade_demandante":"COEX/PAR",
         "nome_unidade_destinataria":"COEX/PAR"
      },
      {
         "id_entrega":"6699",
         "entrega_cancelada":false,
         "nome_entrega":"Mídias sociais e eventos",
         "meta_entrega":"100",
         "tipo_meta":"percentual",
         "data_entrega":"2025-03-31",
         "nome_unidade_demandante":"COEX/PAR",
         "nome_unidade_destinataria":"COEX/PAR"
      },
      {
         "id_entrega":"6700",
         "entrega_cancelada":false,
         "nome_entrega":"Relacionamento com com empresas e instituições do mundo do trabalho",
         "meta_entrega":"100",
         "tipo_meta":"percentual",
         "data_entrega":"2025-03-31",
         "nome_unidade_demandante":"COEX/PAR",
         "nome_unidade_destinataria":"COEX/PAR"
      },
      {
         "id_entrega":"6701",
         "entrega_cancelada":false,
         "nome_entrega":"Reuniões, encontros e capacitação",
         "meta_entrega":"100",
         "tipo_meta":"percentual",
         "data_entrega":"2025-03-31",
         "nome_unidade_demandante":"COEX/PAR",
         "nome_unidade_destinataria":"COEX/PAR"
      }
   ]
}

retorno

{
    "detail": [
        {
            "type": "missing",
            "loc": [
                "body",
                "avaliacao"
            ],
            "msg": "Field required",
            "input": {
                "origem_unidade": "SIAPE",
                "cod_unidade_autorizadora": "26435",
                "cod_unidade_instituidora": "26435",
                "cod_unidade_executora": 120,
                "id_plano_entregas": "3000000120",
                "status": 2,
                "data_inicio": "2025-01-01",
                "data_termino": "2025-03-31",
                "entregas": [
                    {
                        "id_entrega": "6692",
                        "entrega_cancelada": false,
                        "nome_entrega": "Acompanhamento de convêncios",
                        "meta_entrega": "100",
                        "tipo_meta": "percentual",
                        "data_entrega": "2025-03-31",
                        "nome_unidade_demandante": "COEX/PAR",
                        "nome_unidade_destinataria": "COEX/PAR"
                    },
                    {
                        "id_entrega": "6693",
                        "entrega_cancelada": false,
                        "nome_entrega": "Acompanhamento PGD",
                        "meta_entrega": "100",
                        "tipo_meta": "percentual",
                        "data_entrega": "2025-03-31",
                        "nome_unidade_demandante": "COEX/PAR",
                        "nome_unidade_destinataria": "COEX/PAR"
                    },
                    {
                        "id_entrega": "6694",
                        "entrega_cancelada": false,
                        "nome_entrega": "Acompanhamento sistêmico dos projetos de extensão",
                        "meta_entrega": "100",
                        "tipo_meta": "percentual",
                        "data_entrega": "2025-03-31",
                        "nome_unidade_demandante": "COEX/PAR",
                        "nome_unidade_destinataria": "COEX/PAR"
                    },
                    {
                        "id_entrega": "6695",
                        "entrega_cancelada": false,
                        "nome_entrega": "Atendimento à alunos",
                        "meta_entrega": "100",
                        "tipo_meta": "percentual",
                        "data_entrega": "2025-03-31",
                        "nome_unidade_demandante": "COEX/PAR",
                        "nome_unidade_destinataria": "COEX/PAR"
                    },
                    {
                        "id_entrega": "6696",
                        "entrega_cancelada": false,
                        "nome_entrega": "Atendimento/contato com servidores",
                        "meta_entrega": "100",
                        "tipo_meta": "percentual",
                        "data_entrega": "2025-03-31",
                        "nome_unidade_demandante": "COEX/PAR",
                        "nome_unidade_destinataria": "COEX/PAR"
                    },
                    {
                        "id_entrega": "6697",
                        "entrega_cancelada": false,
                        "nome_entrega": "Cadastro de documentos estágio e aprendizagem",
                        "meta_entrega": "100",
                        "tipo_meta": "percentual",
                        "data_entrega": "2025-03-31",
                        "nome_unidade_demandante": "COEX/PAR",
                        "nome_unidade_destinataria": "COEX/PAR"
                    },
                    {
                        "id_entrega": "6698",
                        "entrega_cancelada": false,
                        "nome_entrega": "Controle de documentos e arquivos",
                        "meta_entrega": "100",
                        "tipo_meta": "percentual",
                        "data_entrega": "2025-03-31",
                        "nome_unidade_demandante": "COEX/PAR",
                        "nome_unidade_destinataria": "COEX/PAR"
                    },
                    {
                        "id_entrega": "6699",
                        "entrega_cancelada": false,
                        "nome_entrega": "Mídias sociais e eventos",
                        "meta_entrega": "100",
                        "tipo_meta": "percentual",
                        "data_entrega": "2025-03-31",
                        "nome_unidade_demandante": "COEX/PAR",
                        "nome_unidade_destinataria": "COEX/PAR"
                    },
                    {
                        "id_entrega": "6700",
                        "entrega_cancelada": false,
                        "nome_entrega": "Relacionamento com com empresas e instituições do mundo do trabalho",
                        "meta_entrega": "100",
                        "tipo_meta": "percentual",
                        "data_entrega": "2025-03-31",
                        "nome_unidade_demandante": "COEX/PAR",
                        "nome_unidade_destinataria": "COEX/PAR"
                    },
                    {
                        "id_entrega": "6701",
                        "entrega_cancelada": false,
                        "nome_entrega": "Reuniões, encontros e capacitação",
                        "meta_entrega": "100",
                        "tipo_meta": "percentual",
                        "data_entrega": "2025-03-31",
                        "nome_unidade_demandante": "COEX/PAR",
                        "nome_unidade_destinataria": "COEX/PAR"
                    }
                ]
            }
        },
        {
            "type": "missing",
            "loc": [
                "body",
                "data_avaliacao"
            ],
            "msg": "Field required",
            "input": {
                "origem_unidade": "SIAPE",
                "cod_unidade_autorizadora": "26435",
                "cod_unidade_instituidora": "26435",
                "cod_unidade_executora": 120,
                "id_plano_entregas": "3000000120",
                "status": 2,
                "data_inicio": "2025-01-01",
                "data_termino": "2025-03-31",
                "entregas": [
                    {
                        "id_entrega": "6692",
                        "entrega_cancelada": false,
                        "nome_entrega": "Acompanhamento de convêncios",
                        "meta_entrega": "100",
                        "tipo_meta": "percentual",
                        "data_entrega": "2025-03-31",
                        "nome_unidade_demandante": "COEX/PAR",
                        "nome_unidade_destinataria": "COEX/PAR"
                    },
                    {
                        "id_entrega": "6693",
                        "entrega_cancelada": false,
                        "nome_entrega": "Acompanhamento PGD",
                        "meta_entrega": "100",
                        "tipo_meta": "percentual",
                        "data_entrega": "2025-03-31",
                        "nome_unidade_demandante": "COEX/PAR",
                        "nome_unidade_destinataria": "COEX/PAR"
                    },
                    {
                        "id_entrega": "6694",
                        "entrega_cancelada": false,
                        "nome_entrega": "Acompanhamento sistêmico dos projetos de extensão",
                        "meta_entrega": "100",
                        "tipo_meta": "percentual",
                        "data_entrega": "2025-03-31",
                        "nome_unidade_demandante": "COEX/PAR",
                        "nome_unidade_destinataria": "COEX/PAR"
                    },
                    {
                        "id_entrega": "6695",
                        "entrega_cancelada": false,
                        "nome_entrega": "Atendimento à alunos",
                        "meta_entrega": "100",
                        "tipo_meta": "percentual",
                        "data_entrega": "2025-03-31",
                        "nome_unidade_demandante": "COEX/PAR",
                        "nome_unidade_destinataria": "COEX/PAR"
                    },
                    {
                        "id_entrega": "6696",
                        "entrega_cancelada": false,
                        "nome_entrega": "Atendimento/contato com servidores",
                        "meta_entrega": "100",
                        "tipo_meta": "percentual",
                        "data_entrega": "2025-03-31",
                        "nome_unidade_demandante": "COEX/PAR",
                        "nome_unidade_destinataria": "COEX/PAR"
                    },
                    {
                        "id_entrega": "6697",
                        "entrega_cancelada": false,
                        "nome_entrega": "Cadastro de documentos estágio e aprendizagem",
                        "meta_entrega": "100",
                        "tipo_meta": "percentual",
                        "data_entrega": "2025-03-31",
                        "nome_unidade_demandante": "COEX/PAR",
                        "nome_unidade_destinataria": "COEX/PAR"
                    },
                    {
                        "id_entrega": "6698",
                        "entrega_cancelada": false,
                        "nome_entrega": "Controle de documentos e arquivos",
                        "meta_entrega": "100",
                        "tipo_meta": "percentual",
                        "data_entrega": "2025-03-31",
                        "nome_unidade_demandante": "COEX/PAR",
                        "nome_unidade_destinataria": "COEX/PAR"
                    },
                    {
                        "id_entrega": "6699",
                        "entrega_cancelada": false,
                        "nome_entrega": "Mídias sociais e eventos",
                        "meta_entrega": "100",
                        "tipo_meta": "percentual",
                        "data_entrega": "2025-03-31",
                        "nome_unidade_demandante": "COEX/PAR",
                        "nome_unidade_destinataria": "COEX/PAR"
                    },
                    {
                        "id_entrega": "6700",
                        "entrega_cancelada": false,
                        "nome_entrega": "Relacionamento com com empresas e instituições do mundo do trabalho",
                        "meta_entrega": "100",
                        "tipo_meta": "percentual",
                        "data_entrega": "2025-03-31",
                        "nome_unidade_demandante": "COEX/PAR",
                        "nome_unidade_destinataria": "COEX/PAR"
                    },
                    {
                        "id_entrega": "6701",
                        "entrega_cancelada": false,
                        "nome_entrega": "Reuniões, encontros e capacitação",
                        "meta_entrega": "100",
                        "tipo_meta": "percentual",
                        "data_entrega": "2025-03-31",
                        "nome_unidade_demandante": "COEX/PAR",
                        "nome_unidade_destinataria": "COEX/PAR"
                    }
                ]
            }
        }
    ]
}

@eritonfarias
Copy link
Author

a princípio deu certo aqui

@augusto-herrmann
Copy link
Member

Conseguiu resolver o problema, @eritonfarias ? Era o quê? Podemos fechar a issue?

Os campos avaliacao e data_avaliacao do Plano de Entregas são opcionais. Inclusive a gente testa tanto a omissão desses campos quanto o seu envio com valor null e passam em todos os testes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants