1

I've uploaded a load of wiki articles using newArticle. All my articles are present but when I follow a link to one of them that link is red, and the article goes into edit mode (as if it had just been created). All the expected content is there, and if I hit the save button then press save & view the article starts behaving as I expect (link leading to it is blue, view mode when I follow the link).

I've tried using listArticles and viewArticle to see if there's a magic "published" flag that would make the articles go into view mode (there doesn't seem to be). I uploaded all these articles with blank values for dt, cols and sTags.

Is there a way to publish these articles via the api?

(I'm using version 7.1 according to api.xml).

Fog Creek Case FC1927955

flag

2 Answers

1

The underlying cause for this is not likely due to dt being set/not set, but rather the number of revisions a given wiki article has.

When a new article is first created via the FogBugz UI it only has a single revision and contains the text "This article has not been written" (localized to the appropriate language). Rather than checking for the localized string to determine whether or not an article has been written, we simply check the number of revisions. This is much easier and faster to check and, up until the advent of our API, was also correct.

As a result of this simplified checking mechanism, even if the initial revision of an article contains valid content (like in your example), it will still be treated as a "not yet created" article. By using editArticle to set the dt property, you effectively incremented the revision count and caused FogBugz to correctly treat them as articles containing content.

I have filed a case to correct this directly when using the newArticle API command.

UPDATE: This has been fixed in FogBugz 8!

link|flag
0

It seems that not setting dt was the problem. I've edited all the articles using editArticle, setting the same body and headline and a valid dt and they are fine.

link|flag

Your Answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.