Alphabetical order of text modules

Infos:

  • Used Zammad version: all
  • Used Zammad installation type: (package)
  • Operating system: Ubuntu 20.04
  • Browser + version: firefox 102+

Expected behavior:

  • when using :: text Module Popup, the list is sorted by last update. do you know a way to sort it by alphabet ?

Actual behavior:

  • Text modules popup is sorted by last update.

Steps to reproduce the behavior:

  • Enter :: in Article field

Ah yes, this is one issue I’ve noticed and semi-fixed in a test in our instance; coming up with a good scoring/weighting of results is the hardest part about it.

For doing so, I’ve modified jquery.textmodule.js to add sorting inside of renderResults.

If I get around fiddling with it more to get something I am happy with in the future I’ll open a pull request for my changes.

Otherwise, if you want, I can provide a patch for my current changes which are not perfect, but possibly better than no sorting at all.

1 Like

gladly, post it please :slight_smile:

Alright; here you go :smile:

Figuring out better sorting conditions for relevance is still needed in my opinion; the regFull is here to prioritise full word matches in the list of results and put them at the very bottom. If you come up with any improvements let me know! :smiley:

1 Like

Tnx, it works relatively reliably, but I did not understand where exactly you are not satisfied with it ?

has problems with capital letters ?

I am not satisfied with surfacing relevant text modules quicker for a search, maybe even adding fuzzy search. At least in our use case of text modules we have quite a few long snippets that form an entire message, so one has to sometimes search quite a bit for a relevant one. It does feel like an improvement over no sorting at all, that’s for sure.

Thanks, I am using this sorting method as well, works great :slight_smile:

Given the positive feedback I’ve created a PR for these changes here:

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.