You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.
When I add tags to a File object, then update the file using FileService.updateCommunityFileMetadata, the file in Connections ends up with the tags I added along with a tag called "tag_word".
I'm assuming, but haven't checked, that the same happens with files outside communities.
This is caused by the following code in FileSerializer.getFileEntry():
if (entity.getTags()!=null)
for (String tag : entity.getTags()) {
appendChildren(n, textElement(CATEGORY, tag,
attribute(TERM, CATEGORY_TAG)
));
}
The CATEGORY_TAG constant has the value "tag_word", which is the incorrectly added tag.
I think this comes from a misunderstanding of the Connections API documentation. The documentation says this represents a tag on a file:
<category term="tag_word"/>
I think the intention is that "tag_word" is a placeholder, which the caller should replace with an actual tag in the term attribute, and the element shouldn't have any content.
What the current code does is send "tag_word" as the term attribute of every tag, with the real tag as content of the element. This has the effect of adding both the element content and "tag_word" as tags.
The text was updated successfully, but these errors were encountered:
When I add tags to a
File
object, then update the file usingFileService.updateCommunityFileMetadata
, the file in Connections ends up with the tags I added along with a tag called "tag_word".I'm assuming, but haven't checked, that the same happens with files outside communities.
This is caused by the following code in
FileSerializer.getFileEntry()
:The
CATEGORY_TAG
constant has the value "tag_word", which is the incorrectly added tag.I think this comes from a misunderstanding of the Connections API documentation. The documentation says this represents a tag on a file:
I think the intention is that "tag_word" is a placeholder, which the caller should replace with an actual tag in the
term
attribute, and the element shouldn't have any content.What the current code does is send "tag_word" as the term attribute of every tag, with the real tag as content of the element. This has the effect of adding both the element content and "tag_word" as tags.
The text was updated successfully, but these errors were encountered: