Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

JSON

User object in Server/DC (assignee, comment author, worklog author, etc.):

 

User object in Cloud (assignee, comment author, worklog author, etc.):

 

isSameUser

User comparison for both Server/DC/Cloud:

const isSameUser = (user1, user2) => {
    if (!user1 || !user2) return false;
    if (Object.hasOwn(user1, 'key') && Object.hasOwn(user2, 'key'))
      return user1.key === user2.key;
    if (Object.hasOwn(user1, 'accountId') && Object.hasOwn(user2, 'accountId'))
      return user1.accountId === user2.accountId;

    return false;
}
  • No labels