duplicate items returned from treeitem query

Comments

5 comments

  • Avatar
    Nadia Welter

    Hi Ricardo, 

    This is interesting - I never noticed that before but I was able to repro in my workspace, too. If you issue a request to the tasks endpoint instead of treeitems, it will return each matching entry once. I'll see what I can find out about this. 

    As a side note, you'll want to include "filter[]" when filtering for item_type and owner_id, too. 

    0
    Comment actions Permalink
  • Avatar
    Nadia Welter

    Aha, I found it! It returns both packaged and unpackaged versions of each task. You can see that one of them will have "is_packaged_version" set to true and the other one to false. We have this behavior documented as a known bug.

    0
    Comment actions Permalink
  • Avatar
    Ricardo Signes

    Ha, thanks!  (The missing filter[] was just because I coped during a stupid part of refactoring.)  Good to know that this is both known and understandable.  My duplicate-suppression will remain in place!

    0
    Comment actions Permalink
  • Avatar
    Jeremy W

    Did this ever get fixed?

    0
    Comment actions Permalink
  • Avatar
    Nadia Welter

    Jeremy, no, this didn't get fixed and developers are hesitant to "fix" it in case some customers rely on the existing behavior. since /treeitems has always returned packaged and unpackaged versions of treeitems via descendants. The type-specific endpoints (/tasks, /projects, etc) return a single flat representation, so it may be another workaround (besides implementing duplicate suppression on your end like Ricardo did). 

    0
    Comment actions Permalink

Please sign in to leave a comment.