Awx: Extra newline not sanitized in 'edit' textarea for multiple choice survey answer options

Created on 1 Oct 2019  路  6Comments  路  Source: ansible/awx

ISSUE TYPE
  • Bug Report
SUMMARY


A newline is being left in when a multiple choice survey answers list contains newlines.
Most are sanitized out, but the top one is left in the options for editing (although not the options when the survey is actually executed). This may or may not be related to #4192

ENVIRONMENT
  • AWX version: 7.0.0
  • AWX install method: docker on linux
  • Ansible version: 2.8.5
  • Operating System: Fedora 30
  • Web Browser: Firefox
STEPS TO REPRODUCE

create a survey in a job template, make it a multiple choice. Enter in several options with random extra newlines, then save. Click edit to see if the extra space is still there.

EXPECTED RESULTS

The input should be sanitized, removing all blank newlines.

ACTUAL RESULTS

The topmost newline after the first valid answer option remains in the edit box as long as there is another list item before it, all other newlines are sanitized.
This video shows more
This video doesn't show what happens when hitting save and re-opening the edit, but the newline persists there as well.

ADDITIONAL INFORMATION

low needs_devel bug

All 6 comments

@rebeccahhh is this ready for test? If so can you add the label?

@awithrow9 it hasn't been worked on, I only found and reported the bug. I can validate it's still present if needed.

@rebeccahhh I'm going to move the milestone, thanks.

punting low-priority UI nits to ui-next

Thinking a bit about this one. The way to solve it may be a completely different interface for specifying multiple choice answers. If we came up with a more user friendly way to do this (not a textarea where each line is a survey answer) then this problem would likely go away.

Fixed in the rewrite

Was this page helpful?
0 / 5 - 0 ratings