Home Analyst Portal

User Settings

Gerhard_GoossensGerhard_Goossens Customer Advanced IT Monkey ✭✭✭

Good day everyone,

I have a question for the experts.

I need to add some custom fields to the "User Settings" tab. This is the one in the top right of the portal under your user name.

If I go to the console and do a "pageForm.viewModel" only selected user attributes is avalable.

My plan is to add three extended properties of the user profile in there, I thought that the "User settings" page will be perfoect for this.

It is an Out of Office feature that I want to add so that Work Items cant be assigned to a user if OoO has been set.

In the console these addtributes is available under the extensions tab, and in the portal those attributes is also available if i do a "pageForm.viewModel" in an IR or SR.

But, like stated above, I want to use the "User Settings" that already exists.

I copied the "UserProfile.js" form to custom space and I'm able to modify the form, but because the extended properties is not part of the model, I can not add them to the form.

Does anyone have any ideas of how I can add these extended attributes of the user to this form?


Regards

Gerhard

Answers

  • Konstantin_Slavin-BoKonstantin_Slavin-Bo Customer Ninja IT Monkey ✭✭✭✭

    It seems like the model used for the user in "User Settings" is not the SCSM CI class, as I see a lot of AD attribute and a lack of SCSM attributes. So it looks like Cireson is pulling the info directly from AD on not through the CMDB.

    So you would probably have to edit the page "live" in custom.js, and add the attributes you need by injecting them into DOM. You can get the SCSM user object and its properties with a call to the portal API, and then add the fields to the UserProfile page. You would need also need to be able to update the field in some way, meaning you would have to attach an event handler to the Save and Apply buttons, so you can update the returned object and commit it with another call to the portal API. It's definitely possible, but you'll need have to have an decent understanding of Javascript.

Sign In or Register to comment.