#10913 closed defect (wontfix)
blank option is added when choosing [select-type] custom field
Reported by: | Owned by: | Ryan J Ollos | |
---|---|---|---|
Priority: | normal | Component: | BatchModifyPlugin |
Severity: | normal | Keywords: | batch modify blank select |
Cc: | Peter Suter | Trac Release: | 0.12 |
Description (last modified by )
We have added a drop-down custom field. This field doesn't have blank option. When issuing or updating single ticket, we can't choose blank in this field.
To batch-modify this custom field, we selected this field in the batch modify section. Of course, field and drop-down are appeared in the batch modify section, but blank option is automatically added in the option and we can change it to blank.
This field is required field and don't want to change it to blank.
What should I do to erase blank option in the batch modify option?
Our environment:
- Trac Ver is 0.12
- Plugin Ver is 0.8
Attachments (0)
Change History (7)
comment:1 Changed 12 years ago by
Description: | modified (diff) |
---|
comment:2 Changed 12 years ago by
Description: | modified (diff) |
---|---|
Keywords: | batch modify, blank, dropdown → batch modify blank dropdown |
Owner: | changed from CuriousCurmudgeon to Ryan J Ollos |
Status: | new → assigned |
comment:3 Changed 12 years ago by
comment:4 follow-up: 5 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
From Questioner Thank you for your help rjollos, it worked out well.
comment:5 Changed 12 years ago by
Cc: | Peter Suter added; anonymous removed |
---|---|
Keywords: | select added; dropdown removed |
Replying to goyamashita@yahoo.co.jp:
From Questioner Thank you for your help rjollos, it worked out well.
Well, I didn't think that I had provided a solution. What did you find to be the solution in your case? I'm guessing that you just set optional = false
. That might be a suitable workaround for your case, but of course it's not a general solution, since in some cases a blank option might be allowed (e.g. for Milestone).
I'm still considering to open a ticket in the Trac core about this, and I've cc'ed the developer who integrated the BatchModifyPlugin into the Trac core in case he has an opportunity to review and comment. Anyway I'll leave this ticket closed for now since the BatchModifyPlugin is not really maintained anymore.
comment:6 Changed 10 years ago by
The issue was resolved on the Trac trunk in trac:#10772 for release 1.1.2.
comment:7 Changed 10 years ago by
Resolution: | fixed → wontfix |
---|
I've investigated and found the following:
batchmod.js
, we need to passfalse
for the third parameter tocreateSelect(name, options, optional)
, in order for the blank entry to not appear. This parameter is currently set totrue
.fields['custom']
, which is returned byTicketSystem.get_ticket.fields
. However, this is not currently passed to JavaScript.fields['optional'] = False
, and setting the field to blank through the ticket form is not allowed, so presumably it shouldn't be allowed through BatchModify either.Therefore, a fix for both issues would look something like this at line 55 of
batchmod.js
:->
property
is populated from theproperties
array, which is instantiated in query.html, however this code was moved in later versions of Trac.It seems like the fix here is to pass an array of
optional
andcustom
values and add them to theproperties
array. First though, I'm going to open an ticket in Trac since this plugin is included in the Trac core for version 1.0, and see what the Trac developers have to say about the issue.