Project

General

Profile

bug #9762

Handle cultivars correctly in TaxEditor

Added by Andreas Müller about 1 month ago. Updated 27 days ago.

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

100%

Severity:
normal
Found in Version:
Tags:

Description

copied from #9755

  • If ICNCP is selected make only cultivar ranks (#6387) available
  • If a cultivar rank is selected always show the according fields, no matter if ICNAFP or ICNCP is selected
    • if "Cultivar" is selected show "Cultivar Group" and "Cultivar Name" (new field that should appear above "Cultivar Name")
    • if "Cultivar Group" is selected show "Cultivar Group"
    • if "Grex (ICNCP)" is selected show "Cultivar Group" (see also #9780)
  • Rename Cultivar Name to Cultivar Epithet and Cultivar Group to Cultivar Group Epi. (to make it not too long)
  • for checking if a rank is a cultivar rank use Rank.isCultivar()

Discussion is still need for the following tasks:

  • If ICNafp is selected do not show cultivar ranks
  • Make it possible via preferences to select in nomenclatural code field only from certain Codes (e.g. only ICN and ICNCP), alternatively remove ICNCP from Codes as selecting one of the cultivar ranks (#6387) may be enough to decide that ICNCP is meant (ask taxonomists for correctness of this idea)
  • How to handle graft-chimaera and denomination class rank

picture728-1.png View (7.8 KB) Andreas Müller, 09/23/2021 01:29 PM


Related issues

Related to Edit - feature request #9755: Open issues for cultivar handling In Progress 09/11/2021

Associated revisions

Revision f4caff64 (diff)
Added by Katja Luther about 1 month ago

ref #9762: handle cultivars correctly in tax editor

Revision a1fd4a9b (diff)
Added by Katja Luther about 1 month ago

ref #9762: cultivar group for cultivar and cultivar group and rank handling

Revision c58ab5d6 (diff)
Added by Katja Luther about 1 month ago

ref #9762: avoid NPE

Revision 11fb1cef (diff)
Added by Andreas Müller 30 days ago

ref #9762 fix NPE in cultivar handling

Revision 24d1dcbf (diff)
Added by Katja Luther 29 days ago

ref #9762: remove cultivar ranks for non cultivar codes and use isCultivar()

Revision 7a2e68e9 (diff)
Added by Katja Luther 29 days ago

ref #9762: smaller changes for cultivar names

Revision d29fd8e4 (diff)
Added by Andreas Müller 29 days ago

ref #9762 fix NPE in cultivar handling

Revision 0ea0fdd3 (diff)
Added by Andreas Müller 28 days ago

ref #9762, ref #9755 Add nameCache annotation to cultivar fields

Revision ab600885 (diff)
Added by Katja Luther 28 days ago

ref #9762: fix problems with rank combo and switch nomenclatural code

Revision 4451d6c9 (diff)
Added by Katja Luther 27 days ago

ref #9762: adapt l18n strings

History

#1 Updated by Andreas Müller about 1 month ago

#2 Updated by Katja Luther about 1 month ago

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

Now if ICNCP is selected only the cultivar ranks are available and the fields are displayed depending on the selected rank. Only the handling of grex is missing, because of missing discussion result.

For reviewing the existing implementation set this ticket to resolved.

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

I got NPE when changing to ICNCP:

last remote method : http://test.e-taxonomy.eu:80/cdmserver/rem_conf_am/remoting/common.service
last remote request client time : 2021-09-20T23:07:44.432
last remote request response header time : Mon, 20 Sep 2021 21:07:44 GMT
client error time : 2021-09-20T23:08:16.693
login : admin
editor version : 5.27.0.202109201248
server : test.e-taxonomy.eu (edit-test) / rem_conf_am
schema version : 5.27.0.0.20210913
os : Windows Server 2012 R2 6.3 amd64
java : 1.8.0_131
java.lang.NullPointerException
    at eu.etaxonomy.taxeditor.ui.section.name.NameDetailElement.createCultivarNameParts(NameDetailElement.java:227)
    at eu.etaxonomy.taxeditor.ui.section.name.NameDetailElement.createSpecificNameParts(NameDetailElement.java:199)
    at eu.etaxonomy.taxeditor.ui.section.name.NameDetailElement.createControls(NameDetailElement.java:117)
    at eu.etaxonomy.taxeditor.ui.section.name.NameDetailElement.createControls(NameDetailElement.java:1)
    at eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement.updateContent(AbstractCdmDetailElement.java:109)
    at eu.etaxonomy.taxeditor.ui.section.name.NameDetailElement.updateContent(NameDetailElement.java:164)
    at eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement.setEntity(AbstractCdmDetailElement.java:85)
    at eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection.setEntity(AbstractCdmDetailSection.java:155)
    at eu.etaxonomy.taxeditor.ui.section.name.NonViralNameDetailElement.handleEvent(NonViralNameDetailElement.java:176)
    at eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement.propertyChange(AbstractCdmDetailElement.java:206)
    at eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement.firePropertyChangeEvent(AbstractCdmFormElement.java:230)
    at eu.etaxonomy.taxeditor.ui.combo.EnumComboElement.widgetSelected(EnumComboElement.java:319)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:249)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4236)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3824)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
    at eu.etaxonomy.taxeditor.Application.start(Application.java:20)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1519)

#4 Updated by Andreas Müller about 1 month ago

Due to the above error (and maybe some similar errors) it is difficult to test.

Before passing back please do test on nightly if converting names from ICN to ICNCP back and forth works as expected and leave a message on what you tested.

#5 Updated by Andreas Müller about 1 month ago

Cultivar Group should appear above Cultivar Name

#6 Updated by Andreas Müller about 1 month ago

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

Cultivar group should always appear while cultivar name should disappear if group (or grex) is selected. Currently it is the other way round.

#7 Updated by Andreas Müller about 1 month ago

  • Target version changed from Release 5.28 to Release 5.27

#8 Updated by Andreas Müller 30 days ago

  • % Done changed from 0 to 40

Works correctly now except for 1 open issue: if cultivar epithet or cultivar group are changed the name Cache and the freetext editor text are not updated.
Is this a cdmlib issue or a TaxEditor issue?

#9 Updated by Andreas Müller 30 days ago

Andreas Müller wrote:

Works correctly now except for 1 open issue: if cultivar epithet or cultivar group are changed the name Cache and the freetext editor text are not updated.
Is this a cdmlib issue or a TaxEditor issue?

I have to correct, only the nameCache is not updated.

#10 Updated by Andreas Müller 30 days ago

There is the general issue that the details view does not update correctly when the nomenclatural code or ranks are changed. Is there a ticket for this? Can you please link the ticket (and create if it does not exist yet)?

#11 Updated by Andreas Müller 30 days ago

  • Description updated (diff)

#12 Updated by Katja Luther 29 days ago

Andreas Müller wrote:

There is the general issue that the details view does not update correctly when the nomenclatural code or ranks are changed. Is there a ticket for this? Can you please link the ticket (and create if it does not exist yet)?

This problem is known, I don't know if this ticket is the one I created for it: #8221

Closing or opening a collapsable field solves the problem.

#13 Updated by Andreas Müller 29 days ago

  • Description updated (diff)

New requirement:

  • Rename Cultivar Name to Cultivar Epithet and Cultivar Group to Cultivar Group Epi. (to make it not too long)

AM: Bisher nennen wir das Attribut in TaxonName „cultivarName“. Mir kommt der Begriff „cultivarEpithet“ sinniger vor. Es handelt sich hier doch auch lediglich um ein Epithet ähnlich wie beim Artepithet oder dem infraspezifischen Epithet, oder?

WGB:

Cultivar Epithet ist korrekt

#14 Updated by Andreas Müller 29 days ago

  • Description updated (diff)

#15 Updated by Andreas Müller 29 days ago

  • Description updated (diff)

This is decided now:

  • if "Grex (ICNCP)" is selected show "Cultivar Group"

#16 Updated by Andreas Müller 29 days ago

If ICNafp is selected do not show cultivar ranks

I suggest to implement it like this for now

#17 Updated by Katja Luther 29 days ago

Andreas Müller wrote:

This is decided now:

  • if "Grex (ICNCP)" is selected show "Cultivar Group"

this is fixed

#18 Updated by Katja Luther 29 days ago

Andreas Müller wrote:

If ICNafp is selected do not show cultivar ranks

I suggest to implement it like this for now

this is implemented

#19 Updated by Katja Luther 29 days ago

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

Andreas Müller wrote:

If ICNafp is selected do not show cultivar ranks

I suggest to implement it like this for now

this is implemented as well

#20 Updated by Andreas Müller 29 days ago

  • Status changed from Resolved to Feedback

There was also another NPE that I fixed (careful with name.getRank().doSomething() !!)

#21 Updated by Andreas Müller 29 days ago

  • Assignee changed from Andreas Müller to Katja Luther

When selecting a rank in the combobox the rank shown below in the list is selected and shown afterwards. The selection itself seems to be correct as the correct rank abbreviation is shown in freetext editor.

#22 Updated by Andreas Müller 29 days ago

When changing back from ICNCP to ICNAFP the rank list is not updated.
Also the currently selected rank is not removed (like it is the other way round).

#23 Updated by Andreas Müller 29 days ago

Andreas Müller wrote:

Andreas Müller wrote:

Works correctly now except for 1 open issue: if cultivar epithet or cultivar group are changed the name Cache and the freetext editor text are not updated.
Is this a cdmlib issue or a TaxEditor issue?

I have to correct, only the nameCache is not updated.

This seems not to be fixed yet.

#24 Updated by Katja Luther 28 days ago

Andreas Müller wrote:

Andreas Müller wrote:

Andreas Müller wrote:

Works correctly now except for 1 open issue: if cultivar epithet or cultivar group are changed the name Cache and the freetext editor text are not updated.
Is this a cdmlib issue or a TaxEditor issue?

I have to correct, only the nameCache is not updated.

This seems not to be fixed yet.

this seems to be a cdmlib issue, because entering a species epithet changes the namecache, but the cultivar epithets not included.

#25 Updated by Katja Luther 28 days ago

Andreas Müller wrote:

When selecting a rank in the combobox the rank shown below in the list is selected and shown afterwards. The selection itself seems to be correct as the correct rank abbreviation is shown in freetext editor.

I can't reproduce this with my local installation, I will check it with nightly, when I checked in the updated code.

#26 Updated by Andreas Müller 28 days ago

Katja Luther wrote:

Andreas Müller wrote:

Andreas Müller wrote:

Andreas Müller wrote:

Works correctly now except for 1 open issue: if cultivar epithet or cultivar group are changed the name Cache and the freetext editor text are not updated.
Is this a cdmlib issue or a TaxEditor issue?

I have to correct, only the nameCache is not updated.

This seems not to be fixed yet.

this seems to be a cdmlib issue, because entering a species epithet changes the namecache, but the cultivar epithets not included.

Ok, I found it. Fields that update the nameCache need an annotation @CacheUpdate("nameCache") . I changed and committed this.

#27 Updated by Andreas Müller 28 days ago

Andreas Müller wrote:

Ok, I found it. Fields that update the nameCache need an annotation @CacheUpdate("nameCache") . I changed and committed this.

I tested it. It works now.

#28 Updated by Andreas Müller 28 days ago

Katja Luther wrote:

Andreas Müller wrote:

When selecting a rank in the combobox the rank shown below in the list is selected and shown afterwards. The selection itself seems to be correct as the correct rank abbreviation is shown in freetext editor.

I can't reproduce this with my local installation, I will check it with nightly, when I checked in the updated code.

This is fixed now.

#29 Updated by Andreas Müller 28 days ago

There is a single issue left. When switching back from ICNCP to ICNAFP there comes a warning like:

This does not happen, if only the cultivar group epithet is set. Please do the check for both epithets.
And also change "Cultivar Name" to "Cultivar Epithet" in the warning and ofcourse adapt the warning so it reflects both cultivar epi and cultivar group epi (e.g. by connecting via "and/or" )

#30 Updated by Katja Luther 28 days ago

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

Andreas Müller wrote:

There is a single issue left. When switching back from ICNCP to ICNAFP there comes a warning like:

This does not happen, if only the cultivar group epithet is set. Please do the check for both epithets.
And also change "Cultivar Name" to "Cultivar Epithet" in the warning and ofcourse adapt the warning so it reflects both cultivar epi and cultivar group epi (e.g. by connecting via "and/or" )

This should be fixed.

#31 Updated by Andreas Müller 27 days ago

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

Katja Luther wrote:

Andreas Müller wrote:

There is a single issue left. When switching back from ICNCP to ICNAFP there comes a warning like:

This does not happen, if only the cultivar group epithet is set. Please do the check for both epithets.
And also change "Cultivar Name" to "Cultivar Epithet" in the warning and ofcourse adapt the warning so it reflects both cultivar epi and cultivar group epi (e.g. by connecting via "and/or" )

This should be fixed.

The warning text is not yet adapted (it is still "... Cultivar Name ..."). Instead it should be "... Cultivar Epithet and/or Cultivar Group Epithet ..."

#32 Updated by Andreas Müller 27 days ago

  • % Done changed from 40 to 90

#33 Updated by Andreas Müller 27 days ago

  • Status changed from Feedback to Closed
  • % Done changed from 90 to 100

This seems to be fully fixed now.

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)