How to make a JIRA Number Field read-only? -



How to make a JIRA Number Field read-only? -

as described in title, looking smart, safe , efficient way set number field in jira read-only. below short list of approaches, guides , plugins used in effort accomplish this.

installed , deployed behaviours plugin this resulted in form permission errors on jira setting of basic , editable fields non-writeable. farther investigation revealed known issue not fixed anytime soon. i have gone , downwards options jira's existing field behaviour , not offer alternative set field read-only. hiding not option, field needs visible (more below). a potential alternative create new screen scheme excludes field edit screen. associating new screen schemes our current project little disaster many other projects dependent , shared. hence making field read-only or admin-writeable-only much improve solution in instance.

regarding custom field: created post function in workflow of our current project increment custom number field increments of 1 every time issue/task/bug reopened. in essence, tracking numbers of reopens. brings me reason read-only requirement. developers shouldn't able alter value of field throw off statistics.

you can utilize jquery create field read only, add together field description :

<script type="text/javascript"> ajs.$(document).ready(function() { ajs.$("#customfield_10000").attr("readonly", true); }); </script>

change customfield_10000 custom field id. can find id viewing issue edit page source , checking id have.

check out this , this answers , more details.

[update]

to disable hover-to-edit function well, can add together next script jira's announcement banner , way run on every screen:

<script type="text/javascript"> ajs.$(document).ready(function() { ajs.$("#customfield_10000").attr("readonly", true); ajs.$("#customfield_10000").removeclass("editable-field inactive"); ajs.$("#customfield_10000 .icon-edit-sml").remove(); }); </script>

jira jira-plugin

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -