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 votes

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 Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,156 views 13 19
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot