# Add/remove Tag Utility

**URL:** <https://gramps.discourse.group/t/add-remove-tag-utility/3857>\
**Category:** Development\
**Created:** [July 21, 2023, 3:15pm UTC](https://gramps.discourse.group/t/add-remove-tag-utility/3857 "2023-07-21T15:15:06Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Davesellers](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/davesellers/32/1457_2.png) [@Davesellers](https://gramps.discourse.group/u/Davesellers)\
**Post date:** [July 21, 2023, 3:15pm UTC](https://gramps.discourse.group/t/add-remove-tag-utility/3857/1 "2023-07-21T15:15:06Z")

</div>

5.1.6 win10  
I thought this strange so passing it on for consideration.  
I wanted to print a list of persons so I could output it into a spreadsheet for sorting. The Tag report has the format I need. So I needed to add Tags to the persons I wanted to include in the report.  
I added a new custom filter to select the people.  
I added a new tag for this special print.

I went to the [add/removal tool](https://www.gramps-project.org/wiki/index.php/Addon:AddRemoveTagTool) and selected the tag to be added, but when I went to the filter option, **the filter was not there**.

I thought that there might be a limit to the number displayed, so modified one of the existing filters that was in the list. However, it did not product the results that I wanted. I tried many different things with no results. (It seems to that it had it’s own copy)

In a last ditch effort, I closed and opened GRAMPS and suddenly the filter showed up and all works.  
Seems this utility only updates when gramps is opened. This is not what a user expects and it makes it very difficult to use.

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [July 21, 2023, 5:21pm UTC](https://gramps.discourse.group/t/add-remove-tag-utility/3857/2 "2023-07-21T17:21:35Z")

</div>

When developing the [FilterParams](https://www.gramps-project.org/wiki/index.php/Addon:Isotammi_addons#FilterParams_tool) addon tool, @kku noted some difficulties recognizing when Filters have been changed and the lists need to be refreshed. And I think @cdhorn had similar issues in his Card Views. Unless a feature uses modal dialogs, a smart refresh is sometimes needed.

@Nick-Hall Is this something that is a candidate for a change signal? One visible with the `db.changed` [core method](https://www.gramps-project.org/wiki/index.php/Gramplets#Core_Methods)? (Probably not, since the Custom Filters are stored in a `custom_filters.xml` [external XML file](https://www.gramps-project.org/wiki/index.php/Gramps_XML#See_also) rather than the database. If some of the features will depend on external `.json` files in the future, that might add other things where developers would have to check timestamps for any smarter refresh capabilities.)

---

<div class="post-metadata">

**Author:** ![Nick-Hall](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/nick-hall/32/95_2.png) [@Nick-Hall](https://gramps.discourse.group/u/Nick-Hall)\
**Post date:** [July 21, 2023, 5:36pm UTC](https://gramps.discourse.group/t/add-remove-tag-utility/3857/3 "2023-07-21T17:36:10Z")

</div>

> [@emyoulation](#):
>
> Is this something that is a candidate for a change signal?

We already have the ‘filters-changed’ and ‘filter-name-changed’ signals in the [DisplayState](https://github.com/gramps-project/gramps/blob/master/gramps/gui/displaystate.py#L422) class.  
This is probably just a bug in the tool.

An alternative solution would be to apply the filter in the Person List view, select all the results with `<Ctrl>+A` and then use the “Tag” button to tag them.

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [July 21, 2023, 5:41pm UTC](https://gramps.discourse.group/t/add-remove-tag-utility/3857/4 "2023-07-21T17:41:57Z")

</div>

> [@Nick-Hall](#):
>
> We already have the ‘filters-changed’ and ‘filter-name-changed’ signals in the [DisplayState](https://github.com/gramps-project/gramps/blob/master/gramps/gui/displaystate.py#L422) class.  
> This is probably just a bug in the tool.

Nice! But something that I obviously need to add to that [list of methods](https://www.gramps-project.org/wiki/index.php/Gramplets#Core_Methods) on Gramplet design wiki doc.

I vaguely recall an issue report that that found that ([`RemoveTag.py`](https://github.com/gramps-project/addons-source/blob/ddb32eb151794e5b156aeace00a43bd9d6db57cc/RemoveTagTool/RemoveTagTool.py#L166)) tool was not updating as expected. Maybe it was caching since it didn’t update in the same session?

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [July 21, 2023, 6:17pm UTC](https://gramps.discourse.group/t/add-remove-tag-utility/3857/5 "2023-07-21T18:17:28Z")

</div>

> [@Nick-Hall](#):
>
> We already have the ‘filters-changed’ and ‘filter-name-changed’ signals in the [DisplayState](https://github.com/gramps-project/gramps/blob/master/gramps/gui/displaystate.py#L422) class.  
> This is probably just a bug in the tool.

@Mattkmmr Do you want a MantisBT bug report on the tool? Or is this thread sufficient?

---

<div class="post-metadata">

**Author:** ![Davesellers](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/davesellers/32/1457_2.png) [@Davesellers](https://gramps.discourse.group/u/Davesellers)\
**Post date:** [July 22, 2023, 4:55pm UTC](https://gramps.discourse.group/t/add-remove-tag-utility/3857/6 "2023-07-22T16:55:20Z")

</div>

Learned something else. Thanks.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/gramps/original/1X/2ac1e712b7adf612e31ca08a55419f4cf37c0158.png) [@system](https://gramps.discourse.group/u/system)\
**Post date:** [August 21, 2023, 4:55pm UTC](https://gramps.discourse.group/t/add-remove-tag-utility/3857/7 "2023-08-21T16:55:37Z")

</div>

Closed on August 21, 2023, 4:55pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
