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

Using assign_categories to assign an existing category to user #1500

Closed
MSLTrebesch opened this issue Mar 21, 2023 · 2 comments
Closed

Using assign_categories to assign an existing category to user #1500

MSLTrebesch opened this issue Mar 21, 2023 · 2 comments
Assignees
Labels

Comments

@MSLTrebesch
Copy link

MSLTrebesch commented Mar 21, 2023

Describe the bug
Using the UserManager class to assign an existing user category (already in AGOL portal, applied in interface). Am able to assign the category to the users object. They are visible in the AGOL interface, but cannot be filtered in the interface.

To Reproduce
Steps to reproduce the behavior:

Add user category "test" in AGOL interface:

image

image

Run code from Notebook (ArcGIS API version 2.1.0.2):

from arcgis.gis import GIS
gis = GIS("home")
cat_users = gis.users.search(query='username:student_user_2')
print(cat_users)
gis.users.assign_categories(users=cat_users, categories=["test"])

output:

[<User username:student_user_2>]
[{'student_user_2': True}]

Screenshots
Observing Categories given to user in AGOL:
User shows in "test" category when accessing the member properties, "Categorize" menu option:
Notice that the category is applied, but not checked on the left side menu.
image

And when attempting to filter in AGOL under the "test" category, no users show up, though the above example shows the user is assigned to the category through the API call and interface:
image

Expected behavior
The above issue doesn't happen when working exclusively with AGOL interface - only when assigning categories, from an existing category created in AGOL to the user from the API via "assign_categories"

Platform (please complete the following information):

  • OS: Windows 10
  • Browser: Edge
  • Python API Version: 2.1.0.2
@nanaeaubry nanaeaubry self-assigned this Mar 31, 2023
@nanaeaubry
Copy link
Contributor

Hello, we will take a look at this, thank you for bringing it to our attention

@nanaeaubry
Copy link
Contributor

Hello, you can try by defining the categories as such: ["/Categories/test"]

There was another small bug found that we fixed so it will be reflected in the next release. Thank you

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

No branches or pull requests

2 participants