Setting a user picker Jira custom field as source in an Insight custom field won't work


Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.

Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

You need to set the Filter Issue Scope in an Insight custom field to catch only the objects owned by a certain user, where the current object type is referencing another object type which contains an attribute of type User.

Example:

In your schema you have the Employee object type with an attribute of type User (JIRA User):

And an object type Keyboard with an attribute of type object referencing the object type Employee:


You want to add 2 custom fields in Jira and select in one the Employee and in the other one the Keyboard belonging to him.

Common misunderstanding:

When using a Jira User picker custom field as source for the keyboard custom field, the object related (the keyboard) will be not retrieved.

This is because the Jira User picker lookup search will set the user key of the Jira user in the background only AFTER clicking "Create".
While in the Create screen, the Insight custom field will try to compare the value of the Jira User attribute in object type Keyboard (which would be the value of the User attribute in Employee object type) which is the username, with the user key and will not find a match.

This is because after Jira version 8.4 the format of user key changed due to GDPR and now it is in a format such as JIRAUSER123456. For more info see Preparing for Jira 8.4.

For the same reason this configuration could work only for Jira users created prior to version 8.4 of Jira, where still the user key was the username.

In the end Jira User Picker custom field is not meant to be use for this kind of requirements.

Solution

The solution here consists in using 2 Insight custom fields:

  • one filtering the Employee object type
  • one filtering the objects in object type Keyboard where attribute User is equal to attribute JIRA User in the custom field created to filter the Employee object type

1st custom field:

2nd custom field:





Last modified on Aug 23, 2022

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.