Skip to content

Conversation

@joro75
Copy link
Contributor

@joro75 joro75 commented Jun 14, 2025

If a tag is provided to the ticktick_filter_tasks tool, the name of the tag should be used for the actual filtering of the tags.
Tags with uppercase letters are only the label of the tag, and is not the (TickTick internal) name of the tag itself.

This PR will lookup the correct name of the tag, based on the tag-string that is provided to the ticktick_filter_tasks tool.
This will ensure that filter on the tag is working not matter if the tag-name or the tag-label is provided.

@jen6
Copy link
Owner

jen6 commented Jul 23, 2025

Could you please explain about what usecase do we need this implementation? @joro75

@joro75
Copy link
Contributor Author

joro75 commented Jul 28, 2025

When a task in TickTick is tagged with a tag that has one or more uppercase characters, the actual name of the tag is all lowercase. One possible tag is for example:

 [
   {
        "name": "ai_ticktick",
        "rawName": "ai_ticktick",
        "label": "AI_TickTick",
        "sortOrder": -144904581550848,
        "sortType": "project",
        "color": "#E3CE7B",
        "etag": "f6drth9x",
        "type": 1,
        "sortOption": {
            "groupBy": "project",
            "orderBy": "dueDate"
        },
        "timeline": {
            "range": null,
            "sortType": "project",
            "sortOption": {
                "groupBy": "project",
                "orderBy": "sortOrder"
            }
        }
    }
]

Searching for the tag 'AI_TickTick', which is shown in TickTick itself as 'AI_TickTick', will not be found as internally the tasks are tagged as 'ai_ticktick'. There is thus a difference between the label and the name of a tag. And this often is that the name is all lowercase of the label, however that doesn't need to be.

This PR will do a check on the available tags and converts a tag-search which corresponds to the label of a tag, to use the actual name of the tag. It will improve searching on the tags, when a tag with one or more uppercase characters is used.

@jen6
Copy link
Owner

jen6 commented Aug 2, 2025

When a task in TickTick is tagged with a tag that has one or more uppercase characters, the actual name of the tag is all lowercase. One possible tag is for example:

 [
   {
        "name": "ai_ticktick",
        "rawName": "ai_ticktick",
        "label": "AI_TickTick",
        "sortOrder": -144904581550848,
        "sortType": "project",
        "color": "#E3CE7B",
        "etag": "f6drth9x",
        "type": 1,
        "sortOption": {
            "groupBy": "project",
            "orderBy": "dueDate"
        },
        "timeline": {
            "range": null,
            "sortType": "project",
            "sortOption": {
                "groupBy": "project",
                "orderBy": "sortOrder"
            }
        }
    }
]

Searching for the tag 'AI_TickTick', which is shown in TickTick itself as 'AI_TickTick', will not be found as internally the tasks are tagged as 'ai_ticktick'. There is thus a difference between the label and the name of a tag. And this often is that the name is all lowercase of the label, however that doesn't need to be.

This PR will do a check on the available tags and converts a tag-search which corresponds to the label of a tag, to use the actual name of the tag. It will improve searching on the tags, when a tag with one or more uppercase characters is used.

@joro75 If the lowercase is the problem, how about change label field to lower case? Do we have to check all the fields?

@joro75
Copy link
Contributor Author

joro75 commented Aug 3, 2025

I did some more checks. A 'label' can contain uppercase characters in TickTick, and the corresponding 'name' is (as far as I can see) always the lowercase representation of it. Creating a new tag with the same name and a different casing is not allowed in TickTick, as checks are included during the creation of a new tag to prevent that a duplicate tag name with a different casing is created.

I however do not know if the 'name' is always exactly the same as the lowercase of the 'label'. It could be that there is some way to create a difference in this. I for example didn't test and verify this with the Turkish-I problem.
The best and nicest solution in my opinion is thus to find the correct 'label', and then use the associated 'name'. Just converting the 'label' to a lowercase representation seems as a shortcut for me, which could be causing problems in some specific situations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants