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

Develop to main #161

Merged
merged 14 commits into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ e este projeto adere ao [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
- Implementa hook no método registerRegistrationMetadata da oportunidade, para possibilitar incremento de novos registros atrevéz de plugins e módulos
- Implementa novos hook's para possibilitar manipulação da tela de listagem de fases

### Correções
- Corrige erro no carregamento do formulário de avaliação para o avaliador
- Ajusta estêncil do upload de imagem para carregar ja no tamanho máximo permitido
- Corrige db-update que atualiza legado da distribuição de avaliaçações por categoria
- Corrige db-update que cria as colunas eligible e score

## [7.4] 2024-05-28
### Novas funcionalidades
- Adiciona campos **total de vagas** e **valor total** nas oportunidades
Expand Down
2,773 changes: 2,601 additions & 172 deletions composer.lock

Large diffs are not rendered by default.

36 changes: 22 additions & 14 deletions src/db-updates.php
Original file line number Diff line number Diff line change
Expand Up @@ -2190,32 +2190,40 @@ function __try($sql, $cb = null){
}
}
},
"Cria colunas score e eligible na entidade Registration" => function() use ($conn){
if(!__column_exists('Registration', 'score')) {
__exec("ALTER TABLE Registration ADD COLUMN score FLOAT NULL");
"Cria colunas score e eligible na entidade Registration - correcao" => function() use ($conn){
if(!__column_exists('registration', 'score')) {
__exec("ALTER TABLE registration ADD COLUMN score FLOAT NULL");
}
if(!__column_exists('Registration', 'eligible')) {
__exec("ALTER TABLE Registration ADD COLUMN eligible BOOLEAN NULL");
if(!__column_exists('registration', 'eligible')) {
__exec("ALTER TABLE registration ADD COLUMN eligible BOOLEAN NULL");
}
},
'corrige os valores da distribuição de avaliação por categorias' => function() use ($conn, $app) {
if($values = $conn->fetchAll("SELECT * FROM evaluationMethodConfiguration_meta WHERE key = 'fetchCategories'")) {
'corrige os valores da distribuição de avaliação por categorias - correção' => function() use ($conn, $app) {
if($values = $conn->fetchAll("SELECT * FROM evaluationmethodconfiguration_meta WHERE key = 'fetchCategories'")) {

foreach($values as $value) {
if($fetchCategories = json_decode($value['value'], true)) {
$data = [];
$id = $value['id'];
$val_id = $value['object_id'];
$users = [];
foreach($fetchCategories as $user => $fetchCategorie ) {
if(is_array($fetchCategorie)) {
$data[$user] = $fetchCategorie;
}else {
if(!is_array($fetchCategorie)) {
$categories = explode(";",$fetchCategorie);
$data[$user] = [implode(",", $categories)];

$data[$user] = $categories;

$_data = json_encode($data);
__exec("UPDATE evaluationmethodconfiguration_meta SET value = '{$_data}' WHERE id = {$id}");
$users[] = $app->repo("User")->find($user);
$app->log->debug("Campo fetchCategories atualizado na avaliação {$val_id}");
}
$_data = json_encode($data);
__exec("UPDATE evaluationMethodConfiguration_meta SET value = '{$_data}' WHERE id = {$id}");
$app->log->debug("Campo fetchCategories atualizado na avaliação {$val_id}");

}

$em = $app->repo('EvaluationMethodConfiguration')->find($value['object_id']);
$em->owner->enqueueToPCacheRecreation($users);
$app->em->clear();
}
}
}
Expand Down
Loading
Loading