Fix broken include/exclude param handling for backup API

The "include" query parameter was not returned by getQuery()
if there was also an "exclude" present. Furthermore, the semantics
of the include/exclude parameters was quite strange.

The behavior has been changed as follows:

Start with a result set that contains all entries from CATEGORIES,
except if there is an include list; in this case start with an
empty result set. Then first add all categories contained in the
include list and remove afterwards all entries contained in the
exclude list. If neither an include nor an exclude is specified
the default behavior is to backup/restore all categories.

      will backup/restore all categories except Issues

      will only backup/restore projects

      will only backup/restore projects

Excludes always override includes, so a category that appears in
both lists will be treated as excluded.

Change-Id: Ibdbf1ed4761c3d55429420be7b5bc016333d46f8
Signed-off-by: Michael Ochmann <>
1 file changed