[Koha-bugs] [Bug 20388] Elasticsearch - Ability to add index from UI

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Apr 4 11:35:01 CEST 2018


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20388

--- Comment #9 from Alex Arnaud <alex.arnaud at biblibre.com> ---
(In reply to Jonathan Druart from comment #8)
> 1. What's the point of the JS function valid_line?
> I think you should double-check it, it does not do what you expect it to do.
> 
> 2. You are reusing code to duplicate a new mapping but for something else.
> You should rename the variables to avoid confusion then.
> For instance "search_fields" is not an index name
I wanted to reuse the code as much as possible. It is not a problem for to add
a js fonction dedicated to duplicate search fields only.
> 
> 3. Bug report's title is wrong, we are not adding/removing indices
Right!
> 
> 4. I did not implement that part on the original patch because it's hard to
> keep an interface consistent.
> For instance:
> - create a new search field
> => You cannot create a new mapping, you have to save first
> - create a new search field, save
> => You can delete it. So it you create a mapping using it, you can still
> delete it. If you save => kaboom
> => If you have a search field already mapped and delete the mapping, you
> cannot delete the search field.
I see 2 solutions:
  1) JS code for validating data when saving and warn the user if there is
something inconsistent. May be quite tricky...
  2) Submit the form on clicking the "+add" button. There is a disavantage:
page is reloaded between each adding. Not confortable for adding many search
fields or mapping

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list