Skip to content

feat(workorders): Use users class to add lookup and process workorders data #228

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: users/manisha/add-users-class
Choose a base branch
from

Conversation

manisha-ni
Copy link
Collaborator

Pull Request

🀨 Rationale

To add lookup for user related fields and to convert userId in workorders response to username

πŸ‘©β€πŸ’» Implementation

  • Use obj of User's class to get map of user id and name to convert userId in workorders response to username
  • Pass the list to users to query builder and use it for create lookup

πŸ§ͺ Testing

  • Added unit tests

βœ… Checklist

Manisha Sivakumar added 4 commits May 30, 2025 12:07
Signed-off-by: Manisha Sivakumar <manisha.sivakumar@emerson.com>
Signed-off-by: Manisha Sivakumar <manisha.sivakumar@emerson.com>
Signed-off-by: Manisha Sivakumar <manisha.sivakumar@emerson.com>
Signed-off-by: Manisha Sivakumar <manisha.sivakumar@emerson.com>
@manisha-ni manisha-ni marked this pull request as ready for review May 30, 2025 13:32
expect(result.fields).toHaveLength(1);
expect(result.fields[0].name).toEqual('Updated by');
expect(result.fields[0].values).toEqual(['user 4', 'user 1']);
});
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a test to verify the fallback to userId

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants