Answers.Body: <p>Only bare tags (tags not part of an activity set) trigger the field to appear.</p>
  <p>The issue seems to be partly <a href="https://github.com/civicrm/civicrm-core/blob/a2e0d39b5e824cff71eb78ff0b8f51c6e78655eb/CRM/Report/Form.php#L1876" rel="nofollow noreferrer">how the report retrieves tags</a> where it calls <a href="https://github.com/civicrm/civicrm-core/blob/3ee4c3c50a18c45aaf5c39a17526f7c14bbdf6d3/CRM/Core/BAO/Tag.php#L237" rel="nofollow noreferrer">getTags</a> which only returns bare tags unless you give it a parent id for a tag set.</p>
  <p>I think the report should be updated to match how it's done elsewhere. Where I've seen it it's usually done as two separate fields.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-07-24T19:44:32.763Z
Answers.Text: Thanks again, I guess I should raise this as an issue
Answers.UserDisplayName: Andy Clark
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-07-24T19:28:17.750Z
Answers.LastActivityDate: 2020-07-24T19:28:17.750Z
Answers.UserDisplayName: Demerit
Body: <p>The Activity Details report filter is missing the 'Tags' filter.  The last filter is 'Groups' and just before that is 'County' which is where 'Tags' should be.  The criteria for this field is 'Is one of' and the selection hint is 'Choose state first' - and is unselectable. The previous criteria to that is also 'County' which is working OK. This is a UK installation, at 5.26.2 and I have another installation at this same level where the 'Tag' filter shows OK.  Very odd - I've disabled extensions, checked localisation, settings etc etc. I upgraded to 5.27.3 but exactly the same.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-07-24T19:07:47.017Z
Comments.Text: Maybe a silly question but do you have any tags for activities defined?
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-07-24T19:09:07.740Z
Comments.Text: Yes, I have tags for activities and No, there are no silly questions!
Comments.UserDisplayName: Andy Clark
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-07-24T19:12:31.843Z
Comments.Text: Ahhh. I see that if you have only a tag SET for activities then it doesn't display, as opposed to a bare activity tag (not part of a tag set).
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-07-24T19:22:34.927Z
Comments.Text: Well..... I was trying to be tidy and use tag sets. Now I've added the tag as part of the default 'Tag Tree' (which I thought was a set) the tag filter has returned.  You have the answer, many thanks! (make this the answer and I'll flag it)  Did you spot this from the code in activity.php?
Comments.UserDisplayName: Andy Clark
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-07-24T19:24:16.893Z
Comments.Text: Partly an initial guess from experience with tags vs tagsets behaving differently, and was just looking now into the code. Will post answer since I think it's partly in the way the getTags function is used.
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-07-24T19:29:09.180Z
Comments.Text: For tags to behave differently if they are in a tag set is, I assume, not intentional? Unless I've missed something
Comments.UserDisplayName: Andy Clark
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-07-24T19:31:38.347Z
Comments.Text: I don't think it's intentional. It's probably partly the nature of there being two things that seem to be the same thing.
Comments.UserDisplayName: Demerit
Tags: <civireport><tags>
Title: Activity Details report filter missing tags
ThreadText: # Activity Details report filter missing tags
  
  (Asked by: username_0 on 2020-07-24)
  
  The Activity Details report filter is missing the 'Tags' filter. The last filter is 'Groups' and just before that is 'County' which is where 'Tags' should be. The criteria for this field is 'Is one of' and the selection hint is 'Choose state first' - and is unselectable. The previous criteria to that is also 'County' which is working OK. This is a UK installation, at 5.26.2 and I have another installation at this same level where the 'Tag' filter shows OK. Very odd - I've disabled extensions, checked localisation, settings etc etc. I upgraded to 5.27.3 but exactly the same.
  
  **Tags:** civireport, tags
  
  > **Comments:**
  > **username_1**: Maybe a silly question but do you have any tags for activities defined?  
  > **username_0**: Yes, I have tags for activities and No, there are no silly questions!  
  > **username_1**: Ahhh. I see that if you have only a tag SET for activities then it doesn't display, as opposed to a bare activity tag (not part of a tag set).  
  > **username_0**: Well..... I was trying to be tidy and use tag sets. Now I've added the tag as part of the default 'Tag Tree' (which I thought was a set) the tag filter has returned.  You have the answer, many thanks! (make this the answer and I'll flag it)  Did you spot this from the code in activity.php?  
  > **username_1**: Partly an initial guess from experience with tags vs tagsets behaving differently, and was just looking now into the code. Will post answer since I think it's partly in the way the getTags function is used.  
  > **username_0**: For tags to behave differently if they are in a tag set is, I assume, not intentional? Unless I've missed something  
  > **username_1**: I don't think it's intentional. It's probably partly the nature of there being two things that seem to be the same thing.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-07-24. Score: 4 | Accepted answer
  
  Only bare tags (tags not part of an activity set) trigger the field to appear.
  
  The issue seems to be partly [how the report retrieves tags](https://github.com/civicrm/civicrm-core/blob/a2e0d39b5e824cff71eb78ff0b8f51c6e78655eb/CRM/Report/Form.php#L1876) where it calls [getTags](https://github.com/civicrm/civicrm-core/blob/3ee4c3c50a18c45aaf5c39a17526f7c14bbdf6d3/CRM/Core/BAO/Tag.php#L237) which only returns bare tags unless you give it a parent id for a tag set.
  
  I think the report should be updated to match how it's done elsewhere. Where I've seen it it's usually done as two separate fields.
  
  > **Comments:**
  > **username_0**: Thanks again, I guess I should raise this as an issue  
  
  ---
  
  