Permission Scheme based on calculated Customfield is no more operational

Since many years (Jira 3.6.x), I use User Custom Field in Project Permission Scheme, as it is allowed in Managing project permissions | Administering Jira applications Data Center and Server 7.3 | Atlassian Documentation

In some case, these User Custom Fields may be based on developed fields that extends the class com.atlassian.jira.issue.customfields.impl.MultiUserCFType.

When trying to migrate such User Field one of my plugin to Jira 9.x, I discovered that now, for (Multi/Single) User CustomField, the identification of Users initially based on method com.atlassian.jira.issue.customfields.impl.AbstractMultiCFType.getValueFromIssue(CustomField, Issue) , is no more used in the resolution of allowed users for Permission Scheme.

The resolution is done in com.atlassian.jira.permission.DefaultIssueUserSearchManager.findTopUsersWithPermissionInIssue(String, long, UserSearchIssueContext, ProjectPermissionKey, int, PermissionSchemeLogic) based on a DAO : com.atlassian.jira.permission.QueryDSLSchemePermissionsDAO.findTopUsersFromUserCF(String, long, long, ProjectPermissionKey, int) .

It causes that only users stored in CUSTOMFIELDVALUE table are found.

Any User Field, where members are calculated or stored by another way (Additional Table, REST call, …), are no more usable in Permission Scheme.

What would be the workaround ?
Is there a way to allow Calculated Field in Permissions Scheme ?

I do not have checked yet if the problem exists also for Notification Scheme.

Thanks by advance.
Vincent

1 Like