-
Notifications
You must be signed in to change notification settings - Fork 253
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
Scope Tags to Content Types #1505
Scope Tags to Content Types #1505
Conversation
- Add content_types to TagFilterSet, TagForm and TagTable - Create PrimaryModelRelatedContentType class
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With this as a draft, it's not clear to me how complete this is currently considered to be - I presume you're yet to implement the corresponding model logic to only allow assigning a given tag to a given object if the content_type is a permitted one for that tag?
Acceptance Criteria
|
24ffa5c
to
84214e7
Compare
2a4ef16
to
d8fc2ec
Compare
…zuo-feat-GH872-scope-tags-to-content_types
Make ModelSubclassesQuery reuseable Add content_types to TagSerializer
d48d358
to
b87e5f1
Compare
Can you also update https://github.com/nautobot/nautobot/blob/next/nautobot/docs/release-notes/version-1.3.md?plain=1#L82 so that it's accurate now (We now have three versioned API endpoints as of this PR). |
- Update docs
…zuo-feat-GH872-scope-tags-to-content_types
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple more release-note changes, otherwise looks good!
Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com>
Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com>
…s://github.com/nautobot/nautobot into timizuo-feat-GH872-scope-tags-to-content_types
Add is not None check Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com>
Fixes: #872
Features
Create a Tag with a content type
![Screenshot 2022-03-21 at 12 08 32 PM](https://user-images.githubusercontent.com/94907097/159250370-979c7cd1-dbba-4768-9a0e-7d695c8681bf.png)
NB: If
content_type
is left blank, Tag would be available to allcontent_types
Tag constrained to a particular content type cannot be applied to other content types
![Screenshot 2022-03-21 at 12 28 19 PM](https://user-images.githubusercontent.com/94907097/159252414-3dba5849-0810-4f59-9d2c-4df1f2bdd47a.png)
Tags
(example 1) Site
![Screenshot 2022-03-21 at 12 21 57 PM](https://user-images.githubusercontent.com/94907097/159251817-24af6ecb-6806-4d72-b08a-6daaddf54044.png)
(example 2) Device
![Screenshot 2022-03-21 at 12 24 15 PM](https://user-images.githubusercontent.com/94907097/159251852-bd9ebe2b-b4e9-4968-9c00-35fdef4e7fed.png)