Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Hide or set read-only for text attributes in Jira Insight asset management (Data Center)

VVC
Contributor
July 18, 2025

We have granted our asset developers users with the permissions to edit values for specific object types in a object schema. Due to some internal business process, we do NOT want them to be able to modify a few attribute values on the edit object screen. Hence, would it be possible to set certain text attributes to either hide or read-only for all roles and users except for Jira asset managers?

2 answers

1 accepted

1 vote
Answer accepted
VVC
Contributor
July 22, 2025

I figured it out and here is the code that I have injected in the Announcement Banner.

The below code works only on the edit object page, after searching for the object and clicking the Edit button.

<style type="text/css">
#rlabs-insight-attribute-2941 {
display: none;
}

The below code works only on the edit object page, when you click on the Object ID or Object Name links, which opens in a separate window, followed by clicking the Edit button.

<script>
(function () {
const observer = new MutationObserver(() => {
const labels = document.querySelectorAll("label.ruiLabel");
labels.forEach(label => {
const labelText = label.textContent.trim();
if (labelText === "<replace with your attributename>") {
const container = label.closest(".ruiForm__field");
if (container) {
container.style.display = "none";
}
}
});
});

observer.observe(document.body, { childList: true, subtree: true });
})();
</script>

 

Trudy Claspill
Community Champion
July 22, 2025

Well done!

1 vote
Trudy Claspill
Community Champion
July 18, 2025

Hello @VVC 

Referring to this document:

https://confluence.atlassian.com/servicemanagementserver/adding-attributes-to-object-types-1044784524.html

...you can set an attribute to be hidden from users in the assets-users role.

Screenshot 2025-07-18 at 12.00.09 PM.png

VVC
Contributor
July 20, 2025

Hi @Trudy Claspill Would it be possible to hide or set as read-only field for  "asset-developers" role and specifically on the Edit object screen?

Trudy Claspill
Community Champion
July 21, 2025

I am not aware of a way to change the group to which the "Hidden" option is applied, nor a way to change it only for the Edit screen.

There may be a method to do that of which I am unaware. I do not have the time to research if there are third party apps that can help with that.

Suggest an answer

Log in or Sign up to answer