Project

General

Profile

Actions

bug #9762

closed

Handle cultivars correctly in TaxEditor

Added by Andreas Müller over 2 years ago. Updated over 2 years ago.

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

100%

Estimated time:
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

Files

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

Related issues

Related to EDIT - feature request #9755: Open issues for cultivar handlingIn ProgressAndreas Müller

Actions
Actions #1

Updated by Andreas Müller over 2 years ago

Actions #2

Updated by Katja Luther over 2 years 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.

Actions #3

Updated by Andreas Müller over 2 years 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)
Actions #4

Updated by Andreas Müller over 2 years 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.

Actions #5

Updated by Andreas Müller over 2 years ago

Cultivar Group should appear above Cultivar Name

Actions #6

Updated by Andreas Müller over 2 years 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.

Actions #7

Updated by Andreas Müller over 2 years ago

  • Target version changed from Release 5.45 to Release 5.27
Actions #8

Updated by Andreas Müller over 2 years 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?

Actions #9

Updated by Andreas Müller over 2 years 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.

Actions #10

Updated by Andreas Müller over 2 years 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)?

Actions #11

Updated by Andreas Müller over 2 years ago

  • Description updated (diff)
Actions #12

Updated by Katja Luther over 2 years 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.

Actions #13

Updated by Andreas Müller over 2 years 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

Actions #14

Updated by Andreas Müller over 2 years ago

  • Description updated (diff)
Actions #15

Updated by Andreas Müller over 2 years ago

  • Description updated (diff)

This is decided now:

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

Updated by Andreas Müller over 2 years ago

If ICNafp is selected do not show cultivar ranks

I suggest to implement it like this for now

Actions #17

Updated by Katja Luther over 2 years ago

Andreas Müller wrote:

This is decided now:

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

this is fixed

Actions #18

Updated by Katja Luther over 2 years 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

Actions #19

Updated by Katja Luther over 2 years 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

Actions #20

Updated by Andreas Müller over 2 years ago

  • Status changed from Resolved to Feedback

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

Actions #21

Updated by Andreas Müller over 2 years 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.

Actions #22

Updated by Andreas Müller over 2 years 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).

Actions #23

Updated by Andreas Müller over 2 years 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.

Actions #24

Updated by Katja Luther over 2 years 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.

Actions #25

Updated by Katja Luther over 2 years 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.

Actions #26

Updated by Andreas Müller over 2 years 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.

Actions #27

Updated by Andreas Müller over 2 years 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.

Actions #28

Updated by Andreas Müller over 2 years 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.

Actions #29

Updated by Andreas Müller over 2 years 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" )

Actions #30

Updated by Katja Luther over 2 years 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.

Actions #31

Updated by Andreas Müller over 2 years 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 ..."

Actions #32

Updated by Andreas Müller over 2 years ago

  • % Done changed from 40 to 90
Actions #33

Updated by Andreas Müller over 2 years ago

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

This seems to be fully fixed now.

Actions

Also available in: Atom PDF