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?
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>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @VVC
Referring to this document:
...you can set an attribute to be hidden from users in the assets-users role.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.