Hiding resolution field via javascript in view screen

How can i achieve that?

The following code does not work!!

<script type="text/javascript">
(function($) {
AJS.toInit(function(){
AJS.$("#resolution").hide();
});

JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function (e, context) {
AJS.$("#resolution").hide();
});
})(AJS.$);
</script>

3 answers

1 accepted

Ok i got the link..

The code for Jira 6.2.4 needs to be changed a little bit:

<script type="text/javascript">
(function($) {
AJS.toInit(function(){
AJS.$("#resolution-val").hide();
});

JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function (e, context) {
AJS.$("#resolution-val").hide();
});
})(AJS.$);
</script>

To the best of my knowledge, if the Resolution field is shown editable (loaded into the edit/ transition screen), the field is compulsary. Which means, even though you hide the field using Javascript, JIRA will expect a value for the Resolution field upon the form submission. (server-side validation)

This is not an answer to your question but what you are trying to do seems to be making no sense.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,787 views 18 22
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you