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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Sunday in Agility

You asked for it, so we delivered: images on issues have arrived

A picture tells a thousand words. And agility boards have just released their latest feature: cover images on issues – so now your board can tell a story at first glance. Upload attachmen...

671 views 3 11
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