Skip to content
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

Fix the collection of parents in TagStore's XML export #1099

Merged

Conversation

gycsaba96
Copy link
Contributor

The original XML export for tags looped over only the root elements when collecting parent-child relations. Now, the code uses the lookup dictionary containing every tag.

As far as I know, there is no open issue for this bug.

Detailed steps to reproduce the bug:

  1. Create a deep tag structure with four levels.

    - a
        - b
            - c
                - d
    
  2. Close the program.

  3. You can already see the faulty export in the gtg_data.xml file.

    <taglist>
     <tag id="e21eac43-35d2-480e-8818-5b86dc48b20d" name="a" nonactionable="False"/>
     <tag id="b5a629bc-b146-42b8-a6d0-26a651285d7b" name="b" nonactionable="False" parent="e21eac43-35d2-480e-8818-5b86dc48b20d"/>
     <tag id="cece686c-607d-4388-9bd1-11560d8b32ac" name="c" nonactionable="False"/>
     <tag id="76422fdf-09c0-4902-bbf3-609fe446c08f" name="d" nonactionable="False"/>
    </taglist>
    
  4. If you reopen the program, you can see the tag tree has only two levels instead of four.

    - a
        - b
    - c
    - d
    

The original version looped over only the root elements when
collecting parent-child relations. Now, the code uses the
'lookup' dictionary that contains every tag.
@diegogangl
Copy link
Contributor

Works as advertised, thanks!

@diegogangl diegogangl merged commit ce4fd3c into getting-things-gnome:master May 7, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants