lukas g Posted October 11, 2018 Report Share Posted October 11, 2018 Hello, I am trying to create an numerical custom attribute for Users but only for a specific project id. I am creating the attribute this way: session.create("CustomAttributeConfiguration", {"project_id": current_project_id, "entity_type": "user", "type": custom_attr_type, "label": "TEST", "key": "test", "default": -1, "write_security_roles": [security_role], # all roles "read_security_roles": [security_role], # all roles "config": json.dumps({'isdecimal': False})}) But I am not able to query it although I have correct permissions and I can see it in the ftrack Web Gui. users = session.get_users() for attr in users[0].["custom_attributes"]: print "Custom Attr: '{}'".format(attr) If I set project_id = None I can read and write to it. but that is not an option. Am I missing some detail on how to make it work project based? Kind regards, Lukas Link to comment Share on other sites More sharing options...
Mattias Lagergren Posted October 15, 2018 Report Share Posted October 15, 2018 Hi Lukas, custom attributes on users does not have a relation to a project. If you want to create a custom attribute to track something on a user you can simply omit the project id Link to comment Share on other sites More sharing options...
lukas g Posted October 17, 2018 Author Report Share Posted October 17, 2018 Thanks for the info. I thought it would be possible to have an attribute on a user which was only available in a project with the supplied project_id. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.