Project

General

Profile

feature request #7415

Implement ExternalLinks for OriginalSources in TaxEditor

Added by Andreas Müller 7 months ago. Updated 3 months ago.

Status:
Closed
Priority:
New
Assignee:
Category:
taxeditor
Target version:
Start date:
04/25/2017
Due date:
% Done:

90%

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: ExternalLinks should be shown in DataPortal New 04/25/2017 04/25/2017
Follows Edit - feature request #6588: Add URL and URL comment to OriginalSource / ExternalLink Closed 04/24/2017
Copied to Edit - feature request #7747: reduce space between fields in external links section New 09/11/2018

Associated revisions

Revision 414b03e6 (diff)
Added by Katja Luther 4 months ago

ref #7415: add external link section to original source part

Revision 9ad45667 (diff)
Added by Katja Luther 4 months ago

ref #7415: add external link section to original source part

Revision e4f9e245 (diff)
Added by Andreas Müller 3 months ago

ref #7415 fix NPE in ExternalLinksElement

Revision 89f9d5a7 (diff)
Added by Katja Luther 3 months ago

ref #7415: move name in source behind external links

Revision b937b2de (diff)
Added by Katja Luther 3 months ago

ref #7415: move type at top and shorter labels

History

#1 Updated by Andreas Müller 7 months 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

#2 Updated by Andreas Müller 7 months ago

#3 Updated by Andreas Müller 6 months ago

  • Target version changed from Release 5.1 to Release 5.2

#4 Updated by Andreas Müller 4 months ago

  • Target version changed from Release 5.2 to Release 5.3

#5 Updated by Katja Luther 4 months 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)

#6 Updated by Katja Luther 3 months ago

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

#7 Updated by Andreas Müller 3 months 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)

#8 Updated by Katja Luther 3 months ago

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

#9 Updated by Katja Luther 3 months ago

  • Assignee changed from Katja Luther to Andreas Müller

#10 Updated by Andreas Müller 3 months ago

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

#11 Updated by Andreas Müller 3 months 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?

#12 Updated by Andreas Müller 3 months ago

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

#13 Updated by Katja Luther 3 months ago

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

#14 Updated by Katja Luther 3 months 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

#15 Updated by Katja Luther 3 months ago

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

#16 Updated by Andreas Müller 3 months 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.

#17 Updated by Andreas Müller 3 months 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

#18 Updated by Andreas Müller 3 months ago

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

#19 Updated by Andreas Müller 3 months ago

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

#20 Updated by Andreas Müller 3 months ago

Also please move "type" to top.

#21 Updated by Katja Luther 3 months 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.

#22 Updated by Katja Luther 3 months ago

  • % Done changed from 0 to 80

#23 Updated by Andreas Müller 3 months ago

  • Due date deleted (04/25/2017)

#24 Updated by Katja Luther 3 months 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.

#25 Updated by Katja Luther 3 months ago

#26 Updated by Andreas Müller 3 months 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.

#27 Updated by Andreas Müller 3 months ago

  • % Done changed from 80 to 90

#28 Updated by Katja Luther 3 months ago

  • Status changed from Feedback to Closed

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)