Jump to content

not able to assign more then 27 users per task


Remus Avram

Recommended Posts

Hi,

I would like to assign 50 users to a task in Ftrack. I used the ftrack_api to add automatically all the users to the project and assign them to a single task using the code from below.

import ftrack_api

session = ftrack_api.Session()

project = session.query("Project where name is <project_name>").one()
users = session.query("User where is_active is True").all()
task = session.query(
        "select assignments.resource_id "
        "from Task "
        "where project.name is '<project_name>' and name is '<task_name>'").one()

already_assigned = [_['resource_id'] for _ in task['assignments']]
already_members = [_['resource_id'] for _ in project["allocations"]]

for user in users:
    if user["id"] not in already_members:
        session.create("Appointment", {
            "context": project, "resource": user, "type": "allocation"
            })

    if user['id'] not in already_assigned:
        session.create('Appointment', {
            'context': task, 'resource': user, 'type': 'assignment'
            })

session.commit()

When I opened the Ftrack web interface and click to the Assignee column of the task, it displays only 27 users. Once I click outside of the box, it displays as there were changes to the task. If I save the changes, then it removes some users and keeps only 27.

Is this the normal behaviour, or I am doing something wrong?

Ftrack version: 4.1.5

Best, Remus

Link to comment
Share on other sites

This is a front-end limitation, you can assign and unassign more through the API. We worked around it by managing tasks that need more than the supported user count in the UI in a separate local tool.

It can seemingly be worked around also by changing a MariaDB setting. You may want to talk to support directly if you want to go down that route (we felt that managing that many users from the current legacy resource selector is not exactly fun anyways).

Link to comment
Share on other sites

Hi,

When having lots of assignees on a task the following variable in mysql will cause problems in the Tasks spreadsheet:
https://mariadb.com/kb/en/library/server-system-variables/#group_concat_max_len
From MariaDB 10.2.4 the default value has changed and will no longer result in this problem.
If you are facing this issue now you can change the setting to be 1M.

Updating this variable will solve the problems in the tasks spreadsheet but there is no guarantee other places in the UI will not suffer from other presentational issues when having a large number of assignees on a single task.

/Johan

Link to comment
Share on other sites

  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...