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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Tuesday in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

743 views 1 18
Join discussion

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