Project

General

Profile

Actions

feature request #7415

closed

Implement ExternalLinks for OriginalSources in TaxEditor

Added by Andreas Müller almost 6 years ago. Updated over 5 years ago.

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

90%

Estimated time:
Severity:
normal

Description

OriginalSourceBase now has a Set of ExternalLinks. These should be editable in the TaxEditor.


Related issues

Related to EDIT - feature request #7416: OriginalSourceBase.links should be shown in DataPortalNewAndreas Kohlbecker

Actions
Related to EDIT - feature request #9064: Add ExternalLinks to IdentifiableEntitiesClosedAndreas Müller

Actions
Follows EDIT - feature request #6588: Add URL and URL comment to OriginalSource / ExternalLinkClosedAndreas Müller

Actions
Copied to EDIT - feature request #7747: Enhance display for URI elementNewKatja Luther

Actions
Actions #1

Updated by Andreas Müller almost 6 years ago

  • Due date set to 04/25/2017
  • Start date changed from 05/14/2018 to 04/25/2017
  • Follows feature request #6588: Add URL and URL comment to OriginalSource / ExternalLink added
Actions #2

Updated by Andreas Müller almost 6 years ago

Actions #3

Updated by Andreas Müller almost 6 years ago

  • Target version changed from Release 5.1 to Release 5.2
Actions #4

Updated by Andreas Müller over 5 years ago

  • Target version changed from Release 5.2 to Release 5.3
Actions #5

Updated by Katja Luther over 5 years ago

the fields are available now, but the AUD table definition needs to be updated, the uuid should be allowed to be null (see #7683)

Actions #6

Updated by Katja Luther over 5 years ago

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

Updated by Andreas Müller over 5 years ago

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

Adding an external link throws NPE

login : admin
editor version : 5.3.0.201809042248
server : test.e-taxonomy.eu (edit-test) / rem_conf_am
schema version : 5.0.0.0.20180514
os : Windows Server 2012 R2 6.3 amd64
java : 1.8.0_121
java.lang.NullPointerException
    at eu.etaxonomy.taxeditor.ui.section.common.ExternalLinksElement.setEntity(ExternalLinksElement.java:71)
    at eu.etaxonomy.taxeditor.ui.section.common.ExternalLinksElement.setEntity(ExternalLinksElement.java:1)
    at eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement.<init>(AbstractEntityCollectionElement.java:106)
    at eu.etaxonomy.taxeditor.ui.section.common.ExternalLinksElement.<init>(ExternalLinksElement.java:51)
    at eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.createEntityCollectionElement(CdmFormFactory.java:2698)
    at eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection.createElementComposite(AbstractEntityCollectionSection.java:269)
    at eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection.createDynamicContents(AbstractEntityCollectionSection.java:257)
    at eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection.renderContent(AbstractEntityCollectionSection.java:226)
    at eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection.internalUpdateSection(AbstractEntityCollectionSection.java:207)
    at eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection$2.run(AbstractEntityCollectionSection.java:101)
    at org.eclipse.jface.action.Action.runWithEvent(Action.java:473)
    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:565)
    at org.eclipse.jface.action.ActionContributionItem.lambda$5(ActionContributionItem.java:436)
    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)
Actions #8

Updated by Katja Luther over 5 years ago

I can't reproduce this exception, I tested with nightly and rem_conf_am

Actions #9

Updated by Katja Luther over 5 years ago

  • Assignee changed from Katja Luther to Andreas Müller
Actions #10

Updated by Andreas Müller over 5 years ago

For DescriptionElementSources the ExternalLinks appear now above Name in Source. This is bad for UX. We need to put it to the end.

Actions #11

Updated by Andreas Müller over 5 years ago

Katja Luther wrote:

I can't reproduce this exception, I tested with nightly and rem_conf_am

The exception still exists and to me it seems quite obvious. In line 71 you have

69        if (entity.getDescription() != null) {
70           description.setText(entity.getDescription().get(
71                        CdmStore.getDefaultLanguage()).getText());

so a description exists, but get(defaultLanguage) does not return a value. Therefore .getText() throws an NPE.
By the way entity.getDescription() != null is not really necessary as the description by definition should never be null but an empty HashMap instead.

By the way I use German as DefaultLanguage. I wonder what is different on your machine that you do not get the exception.

I did a quick fix by also checking entity.getDescription().get(CdmStore.getDefaultLanguage()) != null

However, as description is i18n there should be i18n support. Can't we use (c&p?) i18n implementation code for this. Or is this i18n enabled and I just can't see it?

Actions #12

Updated by Andreas Müller over 5 years ago

  • Assignee changed from Andreas Müller to Katja Luther
  • % Done changed from 0 to 40
Actions #13

Updated by Katja Luther over 5 years ago

this is already i18n because CdmStore.getDefaultLanguage() returns the default language defined in the preferences or english if no default language is defined.

Actions #14

Updated by Katja Luther over 5 years ago

Andreas Müller wrote:

For DescriptionElementSources the ExternalLinks appear now above Name in Source. This is bad for UX. We need to put it to the end.

this is fixed

Actions #15

Updated by Katja Luther over 5 years ago

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

Updated by Andreas Müller over 5 years ago

Katja Luther wrote:

this is already i18n because CdmStore.getDefaultLanguage() returns the default language defined in the preferences or english if no default language is defined.

This is a misunderstanding. For me i18n means that it SUPPORTS i18n editing, so you can enter text in multiple languages. As long as this is not possible it does not make sense to show only Default language as this is not a publication tool but an editing tool. If you have German as default language you may still want to edit English text. And you may even want to create German and English in parallel. We have already implemented this at other places.

Actions #17

Updated by Andreas Müller over 5 years ago

The labels may be shortened "External Link URI" -> "URI" . Same for Type. The "External links" header makes it clear.

Also External links -> External Links

Actions #18

Updated by Andreas Müller over 5 years ago

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

Updated by Andreas Müller over 5 years ago

Can we reduce the space between the 3 fields? Usually I like this but here I think it is better to be compact.

Actions #20

Updated by Andreas Müller over 5 years ago

Also please move "type" to top.

Actions #21

Updated by Katja Luther over 5 years ago

  • % Done changed from 40 to 0

Andreas Müller wrote:

Katja Luther wrote:

this is already i18n because CdmStore.getDefaultLanguage() returns the default language defined in the preferences or english if no default language is defined.

This is a misunderstanding. For me i18n means that it SUPPORTS i18n editing, so you can enter text in multiple languages. As long as this is not possible it does not make sense to show only Default language as this is not a publication tool but an editing tool. If you have German as default language you may still want to edit English text. And you may even want to create German and English in parallel. We have already implemented this at other places.

yes this was a misunderstanding. now it is possible to edit the multilanguage text if multilanguage editing is enabled.

Actions #22

Updated by Katja Luther over 5 years ago

  • % Done changed from 0 to 80
Actions #23

Updated by Andreas Müller over 5 years ago

  • Due date deleted (04/25/2017)
Actions #24

Updated by Katja Luther over 5 years ago

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

I set this ticket to resolved and create a new ticket for the reduced spaces between the fields.

Actions #25

Updated by Katja Luther over 5 years ago

Actions #26

Updated by Andreas Müller over 5 years ago

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

This works now and can be closed. Only we could also change the label "External Link Type" to "Type", as this is clear from the context.

Actions #27

Updated by Andreas Müller over 5 years ago

  • % Done changed from 80 to 90
Actions #28

Updated by Katja Luther over 5 years ago

  • Status changed from Feedback to Closed
Actions #29

Updated by Andreas Müller almost 4 years ago

Actions

Also available in: Atom PDF