Skip to content

Assets created twice when importing using the --auto_incrementing tag #98

@BriskFrost

Description

@BriskFrost

I wanted to utilize the --auto_incrementing tag so assets imported from Jamf automatically generate the next appropriate asset tag number in Snipe-IT. When I did this, I ended up with a combination of the default behavior and the auto-incrementing behavior. Here is a sample of how the computers were imported:

Screenshot 2022-11-16 at 4 02 19 PM

It imported each asset twice, one with the default jamf-{id} asset tag, and the other with the --auto_incrementing asset tag. What's really interesting to me is that the auto-incrementing tags are only even. I have my theories as to why it's doing that, but I don't need to get into that.

I believe I included all the relevant details below, but if there are any other details I can provide, please let me know. Thanks!

The command I ran to initiate the sync:
python3 jamf2snipe -v --auto_incrementing --do_not_update_jamf -r -uns -c

My settings.config, minus confidential details (it's mostly just the default options):
manufacturer_id = 35
defaultStatus = 30
computer_model_category_id = 45
mobile_model_category_id = 25
# Not Required, uncomment to use
# computer_custom_fieldset_id = 3
# mobile_custom_fieldset_id = 4
# asset_tag = general serial_number # If not specified, defaults to jamf-{id} or jamf-m-{id}

[computers-api-mapping]
name = general name
_snipeit_mac_address_1 = general mac_address

[mobile_devices-api-mapping]
_snipeit_imei_4 = network imei
name = general name

[user-mapping] # The field from jamf that you want to search Snipe with
jamf_api_field = location username

Proof the auto-incrementing setting is correct in Snipe-IT:
Screenshot 2022-11-16 at 3 30 31 PM

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions