Skip to content

N°8291 - CSV import - column name not automatically recognized in import when name ending by a space #705

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

accognet
Copy link
Contributor

No description provided.

@accognet accognet self-assigned this Mar 31, 2025
@accognet accognet added the internal Work made by Combodo label Mar 31, 2025
@@ -160,7 +160,7 @@ function GetMappingForField($sClassName, $sFieldName, $iFieldIndex, $bAdvancedMo
|| ($oAttDef instanceof AttributeFriendlyName)
) {
$aChoices[$sAttCode] = MetaModel::GetLabel($sClassName, $sAttCode, true);
if (($sFieldName == $oAttDef->GetLabel()) || ($sFieldName == $sAttCode)) {
if (strcasecmp(trim($sFieldName), trim($oAttDef->GetLabel())) == 0 || (trim($sFieldName) == $sAttCode)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should $oAttDef->GetLabel() ever return a string with space at the end?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, but it can happen.

Copy link
Contributor

Choose a reason for hiding this comment

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

How?

And if so, I think that method should be fixed then..

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

Successfully merging this pull request may close these issues.

2 participants