Cannot disable EDITING of Request Type

Paul Wilkinson
Contributor
July 19, 2021

How can I disable editing da Request Type field?

I removed it from the Edit screen but, unlike other fields I removed, it can still be Edited.

 

3 answers

0 votes
Fabian
Contributor
April 25, 2024

@Patrick Eves , @Paul Wilkinson 

I have found a solution that works for us.
We use the Scriptrunner plugin, which allows us to deactivate inline editing with a small workaround.
It's certainly not the best code but you can work with it ;-)

I have created a fragment (Show a web panel). Then i use it to manipulate the html by getting the html element from the request type and reading the name of the request type. Then I hide the element via css and insert a new span with the value on its parent.
You can certainly also change the element. But I haven't tried that or I'm unsure because of other side effects. But on the whole it works.
If anyone has a better code, please let me know :-)

 

example.jpg

Here is the code if someone wants to copy:

 

writer.write("<script>" +
                "document.addEventListener('DOMContentLoaded', function(event){" +
                    "const requestType = document.getElementById('sd-request-type');" +
                    "const parent = requestType.parentElement;" +
                    "const newElement = document.createElement('span');" +
                    "newElement.innerHTML = requestType.textContent;" +
                    "parent.appendChild(newElement);" +
                    "var css = '#sd-request-type { display: none; }', head = document.head || document.getElementsByTagName('head')[0]," +
                    "style = document.createElement('style');" +
                    "head.appendChild(style);" +
                    "style.appendChild(document.createTextNode(css));" +
                "});" +
            "</script>")
0 votes
Paul Wilkinson
Contributor
December 5, 2023

I contacted Atlassian and, after quite a bit of testing, they confirmed that it is not possible to remove the editing of the Request Type.

The only solution is to remove the whole panel with a script in the announcement banner.

We did this and managed the editing of the Request Type with a transition screen.

Paul

0 votes
Albert Manuel
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 19, 2021

Check the permission schema on that particular project - let just the "Browse Permission" for who you DON'T want to edit tickets.

Paul Wilkinson
Contributor
July 21, 2021

I cannot remove the users from EDIT because they must be able to EDIT other fields.

I cannot understand why EDITING of this field is possible although it is not present in the Editable fields of this IssueType.

Paul Wilkinson
Contributor
July 21, 2021

Screenshot 2021-07-21 at 11.36.51.png

Patrick Eves
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 5, 2023

Did you ever find a solution for this?  I am also trying to figure out how to force the Request Type field to be read-only.

Dominik Spescha
Contributor
July 9, 2024

Does anyone know if there is a bug ticket open for that at Atlassian?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events