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

FIX select group and severity search fields on ticket list #32411

Open
wants to merge 6 commits into
base: 18.0
Choose a base branch
from

Conversation

thomas-Ngr
Copy link
Contributor

FIX select group and severity search fields on ticket list

issue #31619 (indicates 20.0, but I encountered it also on develop)
see also PR #32120 , which is similar but for ticket type, and brings more details.

group and severity must be set when creating/updating a ticket, and have a default value.
However, on search fields, we don't want to set the default value.

This PR sets the default value only if $empty is not set.
These are the changes brought by this PR :

  • when $empty is set (case search lists), the empty value is selected
  • when $empty value is not set, the default value is selected. If there is no default value, the firs value of the list is selected.

Had to recreate PR #32142 because the branch did not have the right name.

NB : this bug also exists in develop.

Copy link
Contributor

@rycks rycks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok for me

@@ -856,11 +856,11 @@
print '</td>';
} elseif ($key == 'category_code') {
print '<td class="liste_titre'.($cssforfield ? ' '.$cssforfield : '').'">';
$formTicket->selectGroupTickets(dol_escape_htmltag(empty($search[$key]) ? '' : $search[$key]), 'search_'.$key, '', 2, 1, 1, 0, (!empty($val['css']) ? $val['css'] : 'maxwidth150'));
$formTicket->selectGroupTickets(dol_escape_htmltag(empty($search[$key]) ? '' : $search[$key]), 'search_'.$key, '', 2, '&nbsp;', 1, 0, (!empty($val['css']) ? $val['css'] : 'maxwidth150'));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not keep parameter 1 instead of having HTML code for empty value ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, it works with value '1'.'

print '</td>';
} elseif ($key == 'severity_code') {
print '<td class="liste_titre center'.($cssforfield ? ' '.$cssforfield : '').'">';
$formTicket->selectSeveritiesTickets(dol_escape_htmltag(empty($search[$key]) ? '' : $search[$key]), 'search_'.$key, '', 2, 1, 1, 0, (!empty($val['css']) ? $val['css'] : 'maxwidth150'));
$formTicket->selectSeveritiesTickets(dol_escape_htmltag(empty($search[$key]) ? '' : $search[$key]), 'search_'.$key, '', 2, '&nbsp;', 1, 0, (!empty($val['css']) ? $val['css'] : 'maxwidth150'));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not keep parameter 1 instead of having HTML code for empty value ? (same case as above)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, it works with value '1'.'

@eldy eldy added the Discussion Some questions or discussions are opened and wait answers of author or other people to be processed label Jan 20, 2025
@hregis
Copy link
Contributor

hregis commented Jan 27, 2025

@eldy je sais que je ne suis pas présent à tous les devcamp et vue mes réactions parfois c'est peut-être mieux comme ça.... mais pourquoi il y a des versions comme la v18 qui bénéficient d'un traitement particulier lorsqu'il s'agit de backporter des corrections, voir des corrections qui me sont refusées quand c'est moi ? alors me demande pas quand, quoi, où... c'est un fait... Opendsi fait une version trafiqué à sa sauce et pourquoi il serait prioritaire pour bénéficier des backports alors que quand parfois je veux intégrer des évolutions bloquantes vis à vis de multicompany ceci m'est refusé...
je ne veux pas faire mon caca nerveux dans la cour d'école... mais c'est un thème qui revient souvent.... il y a 2 versions par an... et nous n'avons pas le temps de s'adapter ! et quand les clients de multicompany me posent la question, je leur dit... la prochaine version ! alors que mes modifications n'impactent en général personne qui n'utilisent pas Multicompany !

bref... je n'ai rien contre personne ! je veux juste que tout soit équitable pour tous !
au début c'était une v14, maintenant c'est une v18
et le backport en v18 pour ceux qui on acheté pleins de modules compatible v18 et qui demande juste que leur investissement fonctionne !

ça va trop vite !

@thomas-Ngr
Copy link
Contributor Author

@hregis https://wiki.dolibarr.org/index.php?title=DevCamp_Lyon_2023_hiver#DOLIBARR_LTS

If a you need to discuss this, could you do it on the forum ? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussion Some questions or discussions are opened and wait answers of author or other people to be processed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants