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 Sign up to answer
Community showcase
Posted Sep 18, 2018 in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

27,124 views 2 7
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