Loading...
 
Skip to main content

Dynamic Items List produces blank items if Listed Field (aka listFieldIdThere) is field type Drop down with other

Status
Open
Subject
Dynamic Items List produces blank items if Listed Field (aka listFieldIdThere) is field type Drop down with other
Version
15.x
Category
  • Usability
Feature
Trackers
Resolution status
New
Submitted by
Niel Hirjee
Lastmod by
Niel Hirjee
Rating
(0)
Description

tracker id 11 Apartment Configuration Details has:
97 AptDetail ConfigID text field
98 AptDetail Item drop down with other (Living + Dining Room,Master Bedroom,Master Bathroom,Bedroom #2,Bedroom #2 Bathroom,Bedroom #3,Bedroom #3 Bathroom,Study Room,Common Bathroom,Kitchen,Pantry,Store Room,Verandah #1,Verandah #2,Open Parking #1,Open Parking #2,Covered Parking #1,Covered Parking #2,Secured Garage #1,Secured Garage #2,other=Other)

tracker id 1 Change Management has:
187 CRM ConfigId text field
53 CRM Work Area dynamic items list (tracker id=Apartment Configuration Details, Field ID (Other tracker)=AptDetail ConfigID, Field ID (This tracker)=CRM ConfigId, Listed Field=AptDetail Item)

If AptDetail Item is a tracker drop down field then Dynamic Items List (ie trackerid 1, field id 53) will produce blank items in its drop down list.

Workaround

No workaround in Tiki. However a js kludge like the following is doable:

(function () {

var choices = %22Foo%22,
%22Bar%22,
%22Baz%22
;

$('#myTextBox')

.closest('.controls').append('<div class="help-block">Choose existing or type new one and press Enter</div>').end()

.select2({
width: 'resolve',
placeholder: " ",
initSelection: function (element, callback) {
var value = $(element).val();
if (value)
callback({ id: value, text: value });
},
query: function (query) {
// match
var items = $.grep(choices, function (item) {
if (!query.term)
return true;
return query.matcher(query.term, item);
});

items = items.sort();
if (query.term)
items.push(query.term);

// map to {id: , text: }
var data = {};
data.results = $.map(items, function (item) {
return { id: item, text: item };
})

query.callback(data);
}
});
})();

Importance
5
Easy to solve?
3
Priority
15
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
6258
Created
Sunday 22 January, 2017 19:31:09 UTC
by Niel Hirjee
LastModif
Sunday 22 January, 2017 19:31:09 UTC


Show PHP error messages