Getting white space between fields in the create issue screen

 

Getting white space between fields in the create issue screen,

Excessive white space.PNG

Need Help !! Please suggest how to remove white spaces in the create issue screen.

 

 

 

1 answer

0 vote

What text do you have in the description of the first field?  Can you check that it's completely empty, no whitespace etc?

Also, try renaming the first field so it has a name that fits on one line.  This is a temporary test, just to see if that affects the layout at all

 

Hello Nic,

Thanks for your reply.

We have hided some fields using javascript, getting whitespaces at the place of hidden fields.

Ah.  You shouldn't do that.  If you don't want a field on a screen, remove it from the screen definition.

We need those fields too, but on selection of some radio button.

We have used script to hide first then showing fields on selection of drop down/radio button.

is it possible to remove whitespaces through CSS?

 

Thanks in advance !!

There's nothing you can do about this without hacking the core of Jira, or using something that implements your javascript properly (doing it in the announcements banner or field descriptions is a guaranteed failure).

The correct answer here is "stop hiding the fields if you need them".  Trust your users to get it right.

If you still can't do that, then you'll need to implement javascript hacks properly.  Done as add-ons that can get deep into the screen layouts.  The Behaviours module in ScriptRunnner does this, and can implement your show/hide quite easily.

 

How can we implement using SciptRunner,

can it resolve the WhiteSpace issue?

 

Please Suggest.

Hello Nic

I found some JavaScript working logic,

To Prevent hidden fields from taking up space on form

  1. whenReady(function(form){  
  2. var formEl = form.getFormElem()[0],  
  3. hiddenEls = formEl.querySelectorAll('.mktoFormRow INPUT[type="hidden"]');  
  4. [].forEach.call(hiddenEls,function(el){  
  5. parentNode.style.width = '0';  
  6. });  
  7. });  

 

Could you please help me in getting "How this code works".

It will help me in implementing the same logic to resolve my issue.

 

Thanks !!

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 Monday in Jira Software

How large do you think Jira Software can grow?

Hi Atlassian Community! My name is Shana, and I’m on the Jira Software team. One of the many reasons this Community exists is to connect you to others on similar product journeys or with comparabl...

689 views 6 13
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