-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
CSV Import & Export Custom Fields #2949
CSV Import & Export Custom Fields #2949
Conversation
…this when importing devices
This pull request now encompasses all CSV Import models. I'd appreciate anyone testing it, and reporting back here. |
Hey all, we just tried this on a dev server and it works well (even updates the Import screen for custom vars and adds them as required when so tagged), we'd like this change to go in so we can more easily import/export test data blobs between dev servers before we go to production and we have 36 custom fields at present. Any chance this could get committed to main? Looks like a fairly straightforward merge of a new class... |
Hi. Newbie question .. how do I add this branch to my local netbox installation as a branch? Latest release is installed and working and urgently need this custom field import facility (thanks for providing). Thanks |
I've installed from fresh cloning https://github.com/anthonyeden/netbox.git However the custom field import is not available. What do I need to do to get what is missing in order for this to work? This is a test system. Thanks, Mark |
I'm new to git as well, I think you need to clone the specific branch. Check out https://confluence.atlassian.com/bitbucket/checkout-a-branch-into-a-local-repository-313466957.html You'll need the branch "dev_csvcustomfields" |
Thanks tpomerhn that really helped. git branch -a
git checkout remotes/origin/dev_csvcustomfieldsgit branch
|
Thanks anthonyeden for providing this fundamental and key functionality. I will be importing tenants with custom fields and will provide feedback. Thanks! |
@anthonyeden can you address the reports above concerning broken export functionality? Also looks like it needs to be rebased against |
@anthonyeden Are you able to address these issues? Otherwise, this PR will have to be marked as stale. |
@lampwins Apologies, I must've missed the last message. Yes, I will set aside some time to address this. |
I'm going to close this PR as it has been inactive for months and likely needs to be rebased against the current |
Fixes: #568
This pull request is my first attempt at resolving ticket #568.
With these changes, you can now import Custom Fields to Devices. The UI has been updated, and a new version of CSVChoiceField has been created to map the select-field labels to the DB values when performing an import.
It also adds custom fields to the CSV Exporter, using the same column headings as the importer.
If these changes are correct, we need to enable Custom Field importing for all other models by replacing 'forms.ModelForm' with 'CustomFieldForm' in the inheritance of the remainder of the CSVForm models.