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

GetArticles blocked by section with tag assigned #220

Closed
KenBilling opened this issue May 16, 2016 · 9 comments
Closed

GetArticles blocked by section with tag assigned #220

KenBilling opened this issue May 16, 2016 · 9 comments
Assignees
Milestone

Comments

@KenBilling
Copy link

KenBilling commented May 16, 2016

If a section has a tag assigned to it and the 'Who can view' option of the section is set to 'Signed-in users' and the API user account also has that tag assigned to it, GetArticles should return all of the articles in the section but it does not. The articles are visible with the same user account when logged in interactively, however, as expected. If I remove the tag from the section, GetArticles returns all of the articles again, as expected. The request should be made using the API account credentials (token) but apparently is missing something. If I was more fluent in C#, I'd dig into it but I'm not, sorry.

@mozts2005
Copy link
Member

I am not able to replicate this issue. can you submit a test case or sample code that can replicate this issue?

@KenBilling
Copy link
Author

  1. In a Help Center that contains at least one section with child articles and no tags assigned to them, call GetSections and observe the response in GroupSectionResponse.Sections. The response should include all of the sections. This works as expected. Likewise, the response to GetArticles will contain all of the articles.
  2. In the Help Center UI, create a tag if necessary and assign it to the account used by the API.
  3. In the Help Center UI, edit one of the sections and set the 'Who can view' option of the section to 'Signed-in users' and set the 'Who have all these tags' option to the name of the tag that you assigned to the account in step 2.
  4. Repeat step 1 and compare the results. The current results should include the section changed in step 3 but the section is missing. Likewise, the response to GetArticles will be missing all of the child articles of the section.

@mozts2005
Copy link
Member

I will try to do this with our code as a unit test and see if I can get it to have an issue. so that we can get this fixed.

@mozts2005 mozts2005 added this to the 3.5.0 milestone May 19, 2016
@KenBilling
Copy link
Author

KenBilling commented May 19, 2016

Thanks, Elizabeth.

@mozts2005
Copy link
Member

@KenBilling

I created a unit test out lining the example that you have given.
I am still not able to replicate your issue. If you would please the have a look at the test case and let me know what I am missing or needs to change.

https://github.com/mozts2005/ZendeskApi_v2/blob/master/src/Tests/HelpCenter/ArticleTests.cs#L198

some things to know are that based on the api documents. that when using Tags to control access. A user MUST be a member of all the tags listed on a given section.

@KenBilling
Copy link
Author

KenBilling commented May 31, 2016

Hi, Elizabeth

I looked at your test. Instead of fetching the section that you recreate, can you try fetching all articles in the HC with GetArticles instead of GetArticlesAsync and see if you get the articles in the tagged section? That would more closely match my case.

Thanks,
Ken

@mozts2005
Copy link
Member

I will try to add a new test case. I will async version as soon I will be removing all synchronous code. Version 4 will be async only

@mozts2005
Copy link
Member

I am going to close this issue if you find that you are still having issues please report an example

@KenBilling
Copy link
Author

Where are the specifications for examples or how would one be different than the one I submitted on May 18? I don’t know what more I can provide you.

When run against a section with a tag assigned as I described in the example:

· CURL works as expected

· GetArticles fails to retrieve the articles

· GetArticles succeeds if I remove the tag from the section and switch Who can view from Signed-in users to Anyone.

Did you test with the option set as above and a tag assigned to a section?

From: Elizabeth Schneider [mailto:[email protected]]
Sent: Wednesday, July 13, 2016 4:49 PM
To: mozts2005/ZendeskApi_v2 [email protected]
Cc: Ken Billing [email protected]; Mention [email protected]
Subject: Re: [mozts2005/ZendeskApi_v2] GetArticles blocked by section with tag assigned (#220)

I am going to close this issue if you find that you are still having issues please report an example


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com//issues/220#issuecomment-232519385, or mute the threadhttps://github.com/notifications/unsubscribe/AM80yT_0GtH4KeVcyQmkAT6yFMBjhVxiks5qVXl3gaJpZM4IfyCU.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants