Bug 31779 - Problem with <input> task
Summary: Problem with <input> task
Status: NEW
Alias: None
Product: Ant
Classification: Unclassified
Component: Core tasks (show other bugs)
Version: 1.6.1
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---
Assignee: Ant Notifications List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-19 15:01 UTC by rhino1
Modified: 2008-02-22 12:18 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rhino1 2004-10-19 15:01:58 UTC
I've noticed that the <input> tasks includes the value of the validargs 
argument in the prompt string that it produces at execution time. This 
shouldn't be happening in my view.

For example, given this task:

<input message="Which server should receive the files? 1. Foo   2. Bar   3. 
Test" 
	validargs="1,2,3"
	addproperty="server.choice" 
	defaultvalue="2"/>

I would expect the prompt seen at execution time to be: 

Which server should receive the files? 1. Foo  2. Bar  3. Test

but I'm getting:

Which server should receive the files? 1. Foo  2. Bar  3. Test(1,2,3)

In other words, the values in the 'validargs' parameter are appended to the 
prompt. 

Since this is potentially confusing and esthetically displeasing, I'd like to 
see the code reworked so that the validargs values do not appear in the input 
prompt.
Comment 1 Stefan Bodewig 2004-10-26 14:10:59 UTC
It is only visually displeasing or confusing if you include the list of options
in the prompt already.

For something like <input message="Continue? " validargs="y,n"/> it is a
requirement, I'd say.

It may be possible to make it optional, but there are common uses of the task that
rely on the current behavior - which also means we can't change the default because
of backwards compatibility.