﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc
22558,Attachment term counts feels/are inaccurate,ocean90,,"For posts:
* Assign a term to a post, save as draft. Term count returns 0.
* Publish the post. Term count returns 1.
* Change post status back to draft. Term count returns 0.

For attachments:
* Upload an image, assign a term. Term count returns 0.
* Create a new post and insert the image in a published post. Term count returns 0.
* Create a new post, use the insert media modal and upload an image. Then go the the media edit screen and assign a term to the image. Term count returns 1.
* Change the post status back to draft. Term count returns 1.
* Upload an image, assign a term, attach the attachment to a published post. Term count returns 0.

The default term update callback is `_update_post_term_count`. The function includes a special case for attachments, that's the reason why we have the 1 in step 3.

IMO the term count for attachments shouldn't rely on the parent post status. We should just force `_update_generic_term_count`.

Also noted here: comment:ticket:21391:41",defect (bug),new,normal,Awaiting Review,Media,,normal,,2nd-opinion,
