snipe / snipe-it

A free open source IT asset/license management system
https://snipeitapp.com
GNU Affero General Public License v3.0
10.96k stars 3.16k forks source link

LDAP User Import Country not matching. Selecting a Country on Snipe-IT user displays 2 letter country code. #15580

Closed Toby737 closed 1 week ago

Toby737 commented 1 week ago

Debug mode

Describe the bug

When doing an LDAP Import of users, the country assigned to the user in Snipe-IT does not match what was assigned to the AD user account.

In my example, all our users are based in Germany with the country/region set as Germany for the AD user. However once the user's get imported/updated, Snipe-IT shows the user's country as Zimbabwe. I can change the country manually in Snipe-IT to Germany but the next LDAP sync will change it back to Zimbabwe.

Also, when selecting any country in Snipe-IT, it displays itself as the short form, eg... DE , AU , ZA , CH , etc... Screenshot 2024-09-30 165502 Screenshot 2024-09-30 165925

Reproduction steps

  1. Go to edit a user.

  2. Change the country.

  3. Click Save.

  4. Performing an LDAP user sync.

  5. Edit the user and see the country assigned.

Expected behavior

Screenshots

No response

Snipe-IT Version

7.0.12

Operating System

CentOS 9

Web Server

Apache

PHP Version

8.3.12

Operating System

Windows

Browser

Edge, Chrome, FireFox

Version

Latest

Device

No response

Operating System

No response

Browser

No response

Version

No response

Error messages

No response

Additional context

No response

uberbrady commented 1 week ago

I think I just fixed this in the past few weeks - can you pull the latest from master and confirm whether or not it fixes the problem for you?

Toby737 commented 1 week ago

@uberbrady - I upgraded and it's now running v7.0.13-pre - build 15360. It seems to have fixed the problem thanks. It still adds the asterisk * though at the end of the country. Screenshot 2024-10-01 110441

snipe commented 1 week ago

Great, glad you're sorted! (The asterisk is expected, as explained by the help test below.)