Skip to content
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

Feature Request: add a formatter for user_roles field type #113

Open
jenna-jordan opened this issue May 5, 2022 · 0 comments
Open

Feature Request: add a formatter for user_roles field type #113

jenna-jordan opened this issue May 5, 2022 · 0 comments

Comments

@jenna-jordan
Copy link

The user_roles field type is used in User Roles (a.k.a Accounts) type objects. Currently, the only value grabbed (formatted or unformatted) is the role id (e.g. 'profile_34'). However, the more useful information is the human-readable label (e.g. 'Admin'). These human readable labels are available either in the not raw version of the field (but trapped in html), or in the profile_keys field.

Example of dict stored in the records object is copied below:

'profile_keys':'Admin, Applicants, Licensing Board-p',
'profile_keys_raw':[{'id': 'profile_51', 'identifier': 'Admin'}, {'id': 'profile_34', 'identifier': 'Applicants'}, {'id': 'profile_35', 'identifier': 'Licensing Board-p'}],
'field_96':'<span class="profile_51">Admin</span><br /><span class="profile_34">Applicants</span><br /><span class="profile_35">Licensing Board-p</span>',
'field_96_raw':['profile_51', 'profile_34', 'profile_35']

It would be great to have a formatter to handle this specific field type.

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

No branches or pull requests

2 participants