Getting white space between fields in the create issue screen

pooja chourasia January 2, 2018

 

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
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 3, 2018

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

pooja chourasia January 3, 2018

 

Hello Nic,

Thanks for your reply.

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

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 3, 2018

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

pooja chourasia January 3, 2018

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 !!

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 3, 2018

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.

pooja chourasia January 3, 2018

 

How can we implement using SciptRunner,

can it resolve the WhiteSpace issue?

 

Please Suggest.

pooja chourasia January 3, 2018

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