Unassinged User with UI Kit component can be shown as unassigned?

Hi,
I need help about User UI Kit usage with uanssigned User:
Not expected by my Forge Code


Expected:

Thanks,
YY1

Hey @YY1

Is there any chance you can share the code snippet you’re using that’s producing this?

Cheers!
Melissa

Hi @mpaisley
Thanks for your reply. There’s a table row cell with the below code:
{ content: <User accountId = "Unassigned" /> },
“Unassigned” is not a valid user account id.
Is this information enough for you to identify the root cause?

BTW, the expected screenshot is from the " Workload by assignee" in the Backlog → Sprint.

Thanks,
YY1

Hey @YY1,

Usually in Jira, the Unassigned user is a special case (where the assignee field is null) - so I wouldn’t necessarily expect it to display a particular way within the component in Forge UI Kit.

For now, you could treat the ‘null’ user as a special case in your app too:

     <Text>Unassigned user: </Text> 
     <Inline>
        <User accountId={user} />
        <Text>{user ? "" : "Unassigned"}</Text>
      </Inline>

Which will display the following when your user is null:

I’ve had a look in the Forge project on ecosystem.atlassian.net and it doesn’t look like there’s a feature request to provide this functionality for the User component - so you’re welcome to create one if you like.

I hope this helps,
Mel

Wow, such a great workaround! You helped me & thanks.


There is an extra space after the fallback avatar (little defect).