Export Templates, no results when Filtering for Content types #8472

Closed
opened 2025-12-29 20:37:10 +01:00 by adam · 2 comments
Owner

Originally created by @ross-cello on GitHub (Aug 16, 2023).

Originally assigned to: @abhi1693 on GitHub.

NetBox version

v3.5.8

Python version

3.9

Steps to Reproduce

Reproduced in Demo Netbox v3.5.7 (Note, as of the edit, I moved our test instance to v3.5.8 and reproduced).

  1. Navigate to Customization > Export Templates

  2. Create some Export Templates if you have none present.

CSV example below for creating one circuit, contact, site and tenant. You can import these.

name,content_types,mime_type,file_extension,as_attachment,template_code
extemplate_circuit,circuits.circuit,text/csv,csv,true,{}
extemplate_contact,tenancy.contact,text/csv,csv,true,{}
extemplate_site,dcim.site,text/csv,csv,true,{}
extemplate_tenant,tenancy.tenant,text/csv,csv,true,{}
  1. Once you have some Export Templates, navigate to the search, so Customization > Export Templates > Filters tab

  2. Filter against any content type you know is present, or the four demonstrated above, under Filters tab > Attributes section > Content types field

Example filter for Circuit, Contact, Site, Tenant:
--> https://{netboxhost}/extras/export-templates/?content_types=19&content_types=56&content_types=110&content_types=107

Example filter for Tenant:
--> https://{netboxhost}/extras/export-templates/?content_types=107
  1. Observe search results... or lack thereof.

Expected Behavior

Filtering Content types in the Filters search should return results relevant to the specified Content type that you are filtering for.

Observed Behavior

No results returned for any filtered Content type; at least of those demonstrated.

For many of the other criteria in Filter search - eg MIME type, File extension, Search string and 'Nothing' - these all look to produce results as you would expect; so it looks to just be Content types that is problematic.

Originally created by @ross-cello on GitHub (Aug 16, 2023). Originally assigned to: @abhi1693 on GitHub. ### NetBox version v3.5.8 ### Python version 3.9 ### Steps to Reproduce Reproduced in Demo Netbox v3.5.7 (Note, as of the edit, I moved our test instance to v3.5.8 and reproduced). 1. Navigate to Customization > Export Templates 2. Create some Export Templates if you have none present. CSV example below for creating one circuit, contact, site and tenant. You can import these. ``` name,content_types,mime_type,file_extension,as_attachment,template_code extemplate_circuit,circuits.circuit,text/csv,csv,true,{} extemplate_contact,tenancy.contact,text/csv,csv,true,{} extemplate_site,dcim.site,text/csv,csv,true,{} extemplate_tenant,tenancy.tenant,text/csv,csv,true,{} ``` 3. Once you have some Export Templates, navigate to the search, so Customization > Export Templates > Filters tab 4. Filter against any content type you know is present, or the four demonstrated above, under Filters tab > Attributes section > Content types field ``` Example filter for Circuit, Contact, Site, Tenant: --> https://{netboxhost}/extras/export-templates/?content_types=19&content_types=56&content_types=110&content_types=107 Example filter for Tenant: --> https://{netboxhost}/extras/export-templates/?content_types=107 ``` 5. Observe search results... or lack thereof. ### Expected Behavior Filtering **Content types** in the **Filters** search should return results relevant to the specified **Content type** that you are filtering for. ### Observed Behavior No results returned for any filtered **Content type**; at least of those demonstrated. For many of the other criteria in Filter search - eg MIME type, File extension, Search string and 'Nothing' - these all look to produce results as you would expect; so it looks to just be **Content types** that is problematic.
adam added the type: bugstatus: accepted labels 2025-12-29 20:37:10 +01:00
adam closed this issue 2025-12-29 20:37:10 +01:00
Author
Owner

@jeremystretch commented on GitHub (Aug 16, 2023):

Thank you for opening a bug report. Unfortunately, the information you have provided is not sufficient for someone else to attempt to reproduce the reported behavior. Remember, each bug report must include detailed steps that someone else can follow on a clean, empty NetBox installation to reproduce the exact problem you're experiencing. These instructions should include the creation of any involved objects, any configuration changes, and complete accounting of the actions being taken. Also be sure that your report does not reference data on the public NetBox demo, as that is subject to change at any time by an outside party and cannot be relied upon for bug reports.

@jeremystretch commented on GitHub (Aug 16, 2023): Thank you for opening a bug report. Unfortunately, the information you have provided is not sufficient for someone else to attempt to reproduce the reported behavior. Remember, each bug report must include detailed steps that someone else can follow on a clean, empty NetBox installation to reproduce the exact problem you're experiencing. These instructions should include the creation of any involved objects, any configuration changes, and complete accounting of the actions being taken. **Also be sure that your report does not reference data on the public NetBox demo,** as that is subject to change at any time by an outside party and cannot be relied upon for bug reports.
Author
Owner

@ross-cello commented on GitHub (Aug 16, 2023):

Hi @jeremystretch thanks for responding.

I have edited to increase verbosity and removed Netbox Demo hyperlinking, as well as hyperlink obfuscation where present.
Hopefully that provides more clarity in reproduction steps.

Please also note, that I moved our test instance from v3.5.7 to v3.5.8 in the interim and reproduced issue, so that has been updated as well.

@ross-cello commented on GitHub (Aug 16, 2023): Hi @jeremystretch thanks for responding. I have edited to increase verbosity and removed Netbox Demo hyperlinking, as well as hyperlink obfuscation where present. Hopefully that provides more clarity in reproduction steps. Please also note, that I moved our test instance from v3.5.7 to v3.5.8 in the interim and reproduced issue, so that has been updated as well.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#8472