...
The first and simple way of doing it, and portable across JIRA Jira versions, is by using the lfDisable routine from the Live Fields feature of our Power Scripts™ for Jira app.
Option 1
Create a SIL file called "Main Script" with the following code:
Code Block title MainScript.sil lfDisable("customfield_xxxxx");
where customfield_xxxxx is the the ID of your database child custom field. You can see the custom field ID as a parameter in the URL when editing its configuration.
For example, .../secure/admin/EditCustomField!default.jspa?id=10701.
- Create a Live Field Configuration using the above Main Script and associate it to a project, let's call it ProjX.
- Every time we enter the issue page of the ProjX project, the MainScript.sil is executed and the customfield_xxxxx will be read-only.
Option 2
As an alternative method option you can use javascript injection into the custom field description. Note that this might not be portable across Jira versions.
...
where customfield_xxxxx is the the ID of your database child custom field. You can see the custom field ID as parameter in the URL when editing its configuration.
For example: .../secure/admin/EditCustomField!default.jspa?id=10701.
...
That's it. Your database child field will now be read-only on all screens.