Project

General

Profile

bug #6061

Add titlecache to nom author search

Added by Andreas Müller about 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Highest
Assignee:
Category:
taxeditor
Target version:
Start date:
09/09/2016
Due date:
% Done:

50%

Severity:
critical
Found in Version:

Description

split from #5828

1 additional improvement would be to additionally add the titleCache in brackets after the abbrev title. This way you can better distinguish records being equal in abbrev title. Also it allows searching simultanously on both using * at the beginning of the search string

Associated revisions

Revision 28878 (diff)
Added by Katja Luther about 3 years ago

ref #5828 abbrevTitle and titlecache are displayed in nomenclatural selectionDialogs

Revision 8d5594ee (diff)
Added by Katja Luther about 3 years ago

ref #5828 abbrevTitle and titlecache are displayed in nomenclatural selectionDialogs

Revision bdac48c7 (diff)
Added by Katja Luther about 3 years ago

fix #6061: smaller changes

Revision 98838827 (diff)
Added by Katja Luther about 3 years ago

fix #6061: search for titlecache if abbrev title is empty

Revision d33f8978 (diff)
Added by Katja Luther about 3 years ago

ref #6061: remove the current selection as filter in nomenclatural author selection dialog

Revision 40dfdbc5 (diff)
Added by Katja Luther about 3 years ago

fix #6061: search in titlecache and nomenclatural titleCache in getUuidAndAbbrevTitleCache

Revision 28027bed (diff)
Added by Katja Luther about 3 years ago

fix #6061: add a null check for abbrevTitleCache and titleCache in comparator

Revision 03c8f07b (diff)
Added by Katja Luther about 3 years ago

fix #6061: smaller changes

Revision d436abeb (diff)
Added by Katja Luther about 3 years ago

fix #6061: search for titlecache if abbrev title is empty

Revision 38b82688 (diff)
Added by Katja Luther about 3 years ago

fix #6061: search in titlecache and nomenclatural titleCache in getUuidAndAbbrevTitleCache

History

#1 Updated by Andreas Müller about 3 years ago

  • Due date set to 05/26/2016
  • Start date changed from 09/09/2016 to 05/26/2016

#2 Updated by Andreas Müller about 3 years ago

  • Description updated (diff)
  • Due date deleted (05/26/2016)
  • Status changed from New to Feedback
  • Target version changed from Unassigned CDM tickets to Release 4.3
  • Start date changed from 05/26/2016 to 09/09/2016
  • % Done changed from 0 to 50

The fix generally works, but we should further improve it.

  1. If nomTitleCache and titleCache is equal we should show only 1 version to make the result less komplex. This is very often the case so an important improvement.

  2. I wonder if hyphen (-) is the best separator. Have you tried with brackets? For authors brackets might be better/more obvious. But e.g. for references, which do have brackets included it might be less intuitive, but they also have hyphens sometimes. Maybe we should discuss with users and keep it as it is for now.

#3 Updated by Andreas Müller about 3 years ago

  • Severity changed from normal to critical

Some more critical issues:

  1. Ordering works on titleCache now but one would expect it to work on nomCache. E.g. if a person is "Zestpers. - Testperson" it appears within T not Z.

  2. Using a dot in the search does not work. E.g. if you search for an existing record "Exaut. - Exauthor" and you search by "Exaut." you get no result. This is even the case when the record was just newly created so the return from the new person button does not show any result, which is very critical.

#4 Updated by Katja Luther about 3 years ago

  • Status changed from Feedback to Resolved

Applied in changeset cdmlib:commit:cdmlib|bdac48c7613040ed609183f74552333ef1fb626c.

#5 Updated by Katja Luther about 3 years ago

  • Assignee changed from Katja Luther to Andreas Müller

The ordering works now on the abbrev title and the search works for strings with a point at the end, but the object already selected does not show up in the selection dialog. This is the same for all selection dialogs.

#6 Updated by Andreas Müller about 3 years ago

  • Status changed from Resolved to Feedback
  • Assignee changed from Andreas Müller to Katja Luther

If titleCache is same as nomTitle both versions are still shown. See note-#2

#7 Updated by Andreas Müller about 3 years ago

Katja Luther wrote:

... but the object already selected does not show up in the selection dialog. This is the same for all selection dialogs.

Is there a reason why it is such? Was it a requirement. Currently it looks strange to me but maybe there are use-cases from which it becomes more clear. Is it explicitly coded in the code?

#8 Updated by Andreas Müller about 3 years ago

Ordering and dot search seem to work well now.

#9 Updated by Andreas Müller about 3 years ago

Search on titleCache with * at the beginning (additionally to the nom.title) still does not work. Is this difficult to implement? To me it looks like nice feature so if difficult to implement we may want to create a new ticket for it. The current solution is not so intuitive because the user can see the titleCache in the result and will wonder why when restricting the search in a way that it does not match the nom.title there comes no result back.

#10 Updated by Katja Luther about 3 years ago

Andreas Müller wrote:

Katja Luther wrote:

... but the object already selected does not show up in the selection dialog. This is the same for all selection dialogs.

Is there a reason why it is such? Was it a requirement. Currently it looks strange to me but maybe there are use-cases from which it becomes more clear. Is it explicitly coded in the code?

Yes, it is explicitely coded in the code. There is an attribute cdmBaseToBeFiltered in the base class of the selection dialog, which is filled with the actual object. I think the original idea was that if I want to change something, I don't need the object selected before.

#11 Updated by Katja Luther about 3 years ago

Katja Luther wrote:

Andreas Müller wrote:

Katja Luther wrote:

... but the object already selected does not show up in the selection dialog. This is the same for all selection dialogs.

Is there a reason why it is such? Was it a requirement. Currently it looks strange to me but maybe there are use-cases from which it becomes more clear. Is it explicitly coded in the code?

Yes, it is explicitely coded in the code. There is an attribute cdmBaseToBeFiltered in the base class of the selection dialog, which is filled with the actual object. I think the original idea was that if I want to change something, I don't need the object selected before.

I had a look in the code and the idea of this attribute was another one. The idea was for example if the selection dialog is used for a taxonrelationship and it should not allowed to add the taxon itself, the selection dialog can filter the taxon out of the list. I will have a look in all selection dialogs and adapt it.

#12 Updated by Katja Luther about 3 years ago

Andreas Müller wrote:

Search on titleCache with * at the beginning (additionally to the nom.title) still does not work. Is this difficult to implement? To me it looks like nice feature so if difficult to implement we may want to create a new ticket for it. The current solution is not so intuitive because the user can see the titleCache in the result and will wonder why when restricting the search in a way that it does not match the nom.title there comes no result back.

What Do you mean? That for an * at the beginning the search is only on the titleCache?
Thats not really clear because it also could mean that the search is on the nom title but the search patter should be at the end of the string.
If we want to have this feature we should use another wildcard for this.

#13 Updated by Katja Luther about 3 years ago

Katja Luther wrote:

Katja Luther wrote:

Andreas Müller wrote:

Katja Luther wrote:

... but the object already selected does not show up in the selection dialog. This is the same for all selection dialogs.

Is there a reason why it is such? Was it a requirement. Currently it looks strange to me but maybe there are use-cases from which it becomes more clear. Is it explicitly coded in the code?

Yes, it is explicitely coded in the code. There is an attribute cdmBaseToBeFiltered in the base class of the selection dialog, which is filled with the actual object. I think the original idea was that if I want to change something, I don't need the object selected before.

I had a look in the code and the idea of this attribute was another one. The idea was for example if the selection dialog is used for a taxonrelationship and it should not allowed to add the taxon itself, the selection dialog can filter the taxon out of the list. I will have a look in all selection dialogs and adapt it.

Now I had another look in the history of the selectionDialogFactory and the usage of this cdmBaseToBeFiltered was the same as now from the beginning. Nils wrote this comment but never used the attribute like this. Always the current selection was filtered.

#14 Updated by Katja Luther about 3 years ago

now searching with * at the beginning of the search pattern searches on abbrevTitleCache and titleCache

#15 Updated by Katja Luther about 3 years ago

  • Assignee changed from Katja Luther to Andreas Müller

#17 Updated by Andreas Müller about 3 years ago

  • Assignee changed from Andreas Müller to Katja Luther

Deduplication of equals caches looks good now.

Search on titleCache does not yet work. E.g. create a Person with nomTitle "Aaaa." and titleCache "Bbbb".
Searching for Aaaa works but "*Bbbb" does not return a result.

#18 Updated by Katja Luther about 3 years ago

Andreas Müller wrote:

Deduplication of equals caches looks good now.

Search on titleCache does not yet work. E.g. create a Person with nomTitle "Aaaa." and titleCache "Bbbb".
Searching for Aaaa works but "*Bbbb" does not return a result.

sorry, it wasn't checked in yet...

#19 Updated by Katja Luther about 3 years ago

  • Status changed from Feedback to Resolved

Applied in changeset cdmlib:commit:cdmlib|40dfdbc5479f32292017fadeca45b8424dda4896.

#20 Updated by Katja Luther about 3 years ago

  • Assignee changed from Katja Luther to Andreas Müller

#21 Updated by Andreas Müller about 3 years ago

  • Status changed from Resolved to Feedback
  • Assignee changed from Andreas Müller to Katja Luther

With the above example Aaaa/Bbbb I get the following exception when exactly searching for "*B".
Entering "*Bb" works again and gives the correct result.

login : 
editor version : 4.3.0.201609191958
server :  / 
schema version : 
os : Windows Server 2012 6.2 amd64
java : 1.7.0_65
java.lang.NullPointerException
    at java.text.RuleBasedCollator.compare(RuleBasedCollator.java:351)
    at eu.etaxonomy.taxeditor.ui.dialog.selection.NomenclaturalAuthorSelectionDialog$2.compare(NomenclaturalAuthorSelectionDialog.java:218)
    at eu.etaxonomy.taxeditor.ui.dialog.selection.NomenclaturalAuthorSelectionDialog$2.compare(NomenclaturalAuthorSelectionDialog.java:1)
    at eu.etaxonomy.taxeditor.ui.dialog.selection.CdmFilteredItemsSelectionDialog$HistoryComparator.compare(CdmFilteredItemsSelectionDialog.java:3390)
    at java.util.TimSort.binarySort(TimSort.java:265)
    at java.util.TimSort.sort(TimSort.java:208)
    at java.util.TimSort.sort(TimSort.java:173)
    at java.util.Arrays.sort(Arrays.java:659)
    at java.util.Collections.sort(Collections.java:217)
    at eu.etaxonomy.taxeditor.ui.dialog.selection.CdmFilteredItemsSelectionDialog$ContentProvider.getSortedItems(CdmFilteredItemsSelectionDialog.java:2925)
    at eu.etaxonomy.taxeditor.ui.dialog.selection.CdmFilteredItemsSelectionDialog$ContentProvider.rememberResult(CdmFilteredItemsSelectionDialog.java:2938)
    at eu.etaxonomy.taxeditor.ui.dialog.selection.CdmFilteredItemsSelectionDialog$FilterJob.filterContent(CdmFilteredItemsSelectionDialog.java:2263)
    at eu.etaxonomy.taxeditor.ui.dialog.selection.CdmFilteredItemsSelectionDialog$FilterJob.internalRun(CdmFilteredItemsSelectionDialog.java:2199)
    at eu.etaxonomy.taxeditor.ui.dialog.selection.CdmFilteredItemsSelectionDialog$FilterJob.doRun(CdmFilteredItemsSelectionDialog.java:2170)
    at eu.etaxonomy.taxeditor.ui.dialog.selection.CdmFilteredItemsSelectionDialog$FilterJob.run(CdmFilteredItemsSelectionDialog.java:2157)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

#22 Updated by Katja Luther about 3 years ago

Andreas Müller wrote:

With the above example Aaaa/Bbbb I get the following exception when exactly searching for "*B".
Entering "*Bb" works again and gives the correct result.

login : 
editor version : 4.3.0.201609191958
server :  / 
schema version : 
os : Windows Server 2012 6.2 amd64
java : 1.7.0_65
java.lang.NullPointerException
  at java.text.RuleBasedCollator.compare(RuleBasedCollator.java:351)
  at eu.etaxonomy.taxeditor.ui.dialog.selection.NomenclaturalAuthorSelectionDialog$2.compare(NomenclaturalAuthorSelectionDialog.java:218)
  at eu.etaxonomy.taxeditor.ui.dialog.selection.NomenclaturalAuthorSelectionDialog$2.compare(NomenclaturalAuthorSelectionDialog.java:1)
  at eu.etaxonomy.taxeditor.ui.dialog.selection.CdmFilteredItemsSelectionDialog$HistoryComparator.compare(CdmFilteredItemsSelectionDialog.java:3390)
  at java.util.TimSort.binarySort(TimSort.java:265)
  at java.util.TimSort.sort(TimSort.java:208)
  at java.util.TimSort.sort(TimSort.java:173)
  at java.util.Arrays.sort(Arrays.java:659)
  at java.util.Collections.sort(Collections.java:217)
  at eu.etaxonomy.taxeditor.ui.dialog.selection.CdmFilteredItemsSelectionDialog$ContentProvider.getSortedItems(CdmFilteredItemsSelectionDialog.java:2925)
  at eu.etaxonomy.taxeditor.ui.dialog.selection.CdmFilteredItemsSelectionDialog$ContentProvider.rememberResult(CdmFilteredItemsSelectionDialog.java:2938)
  at eu.etaxonomy.taxeditor.ui.dialog.selection.CdmFilteredItemsSelectionDialog$FilterJob.filterContent(CdmFilteredItemsSelectionDialog.java:2263)
  at eu.etaxonomy.taxeditor.ui.dialog.selection.CdmFilteredItemsSelectionDialog$FilterJob.internalRun(CdmFilteredItemsSelectionDialog.java:2199)
  at eu.etaxonomy.taxeditor.ui.dialog.selection.CdmFilteredItemsSelectionDialog$FilterJob.doRun(CdmFilteredItemsSelectionDialog.java:2170)
  at eu.etaxonomy.taxeditor.ui.dialog.selection.CdmFilteredItemsSelectionDialog$FilterJob.run(CdmFilteredItemsSelectionDialog.java:2157)
  at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

This was also a data problem, the person BGBM had no abbrevTitleCache and therefore we got a NPE. Now the comparator checks for null in abbrevTitleCache and titleCache. Normally this should not happen, because the abbrevTitleCache should not be null, but for older data we have to check.

#23 Updated by Katja Luther about 3 years ago

  • Status changed from Feedback to Resolved

Applied in changeset taxeditor:commit:taxeditor|28027bed8148feb8c9a3cfdbd7e203e62ad51733.

#24 Updated by Katja Luther about 3 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)