#10784 closed defect (fixed)
Don't work if no milestone defined
Reported by: | Owned by: | falkb | |
---|---|---|---|
Priority: | normal | Component: | SimpleMultiProjectPlugin |
Severity: | blocker | Keywords: | |
Cc: | Trac Release: |
Description
If there is no milestone defined.. (perhaps bad idea but..) filter_milestone.js crashes as no options found...
Attachments (0)
Change History (11)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
Component: | SELECT A HACK → SimpleMultiProjectPlugin |
---|---|
Owner: | changed from anonymous to Christopher Paredes |
comment:3 Changed 12 years ago by
Owner: | changed from Christopher Paredes to falkb |
---|---|
Status: | new → assigned |
comment:4 Changed 12 years ago by
Please, provide the circumstances of the crash:
- Versions of Trac, Python, used internet browser and svn version of SimpleMultiProjectPlugin
- exact javascript error text (seen in browser debugger?)
comment:5 Changed 12 years ago by
Replying to gdoumenc@coworks.pro:
If there is no milestone defined.. (perhaps bad idea but..) filter_milestone.js crashes as no options found...
Do you have no milestone in the whole Trac instance, or just for a certain project?
comment:6 Changed 12 years ago by
No milestone in the whole instance..
In code for milestone (select), there is no options and options is null!!
... if (select.prop) { options = select.prop('options'); } else { options = select.attr('options'); } ...
comment:7 Changed 12 years ago by
Please, apply testwise:
-
simplemultiprojectplugin/trunk/simplemultiproject/htdocs/filter_milestones.js
12 12 select.empty(); 13 13 14 14 var addedOptions = []; 15 if ( newOptions) {15 if (options && newOptions) { 16 16 $.each(newOptions, function(val, text) { 17 17 var isSelected = (selectedOption && text == selectedOption); 18 18 options[options.length] = new Option(text, text, isSelected, isSelected); … … 20 20 }); 21 21 } 22 22 23 if ( selectedOption && $.inArray(selectedOption, addedOptions) == -1) {23 if (options && selectedOption && $.inArray(selectedOption, addedOptions) == -1) { 24 24 options[options.length] = new Option(selectedOption, selectedOption, true, true); 25 25 }
Better now?
comment:8 follow-up: 9 Changed 12 years ago by
Sorry, I used egg to install so I don't know where to do the change.. ;(
comment:9 Changed 12 years ago by
comment:11 Changed 12 years ago by
Thanks a lot. Most work of software programming goes to the handling of special cases.
Which plugin is this report for?