Bug 839464 - Ambiguous Relationship Target ID error is a little confusing
Summary: Ambiguous Relationship Target ID error is a little confusing
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: PressGang CCMS
Classification: Community
Component: CSProcessor
Version: 1.x
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ---
Assignee: Lee Newson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-07-12 03:14 UTC by Joshua Wulf
Modified: 2014-10-19 23:01 UTC (History)
3 users (show)

Fixed In Version: 0.27.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-06-07 01:31:08 UTC
Embargoed:


Attachments (Terms of Use)

Description Joshua Wulf 2012-07-12 03:14:24 UTC
The current error output:

ERROR: Line 53: Invalid Topic! Topics that are used twice inside of a Content Specification cannot be related to directly. To relate to one of these topics please use a Target.
       -> Push source material only [6147]
ERROR: Line 53: Invalid Topic! Topics that are used twice inside of a Content Specification cannot be related to directly. To relate to one of these topics please use a Target.
       -> Push source material only [6147]



A few things:

1. It's not really an "Invalid Topic". It's more accurately an "Ambiguous Relationship Target". Recommend changing the error message text.

2. The line that throws this error is:

Push source material only [6147] [P:6144] [R:6149]

The actual cause of the error is the relationships part: [P:6144] [R:6149]
However, the error message doesn't show them, only: 
Push source material only [6147]

Recommend putting the whole line, and perhaps highlighting somehow the part that caused the error.

3. Since it has two relationships on it,and the error was thrown twice, I can deduce that they both are the cause of the problem. When I replace one with a valid target identifier I get the error:
 -> Push source material only [6147] [R: 6125]
In this error output the valid target identifier is there, but the invalid one is not. So combining this with two, the idea would be to show everything from the line, but perhaps make the offending one white-on-black or something similar?
 


==============================
Generated Details:

Package: cspclient-0.25.1-1.noarch

OS: Fedora release 16 (Verne)

JAVA: java version "1.7.0"
Java(TM) SE Runtime Environment (build 1.7.0-b147)
Java HotSpot(TM) Client VM (build 21.0-b17, mixed mode, sharing)


CSProcessor client version: 0.25.1
Loading configuration from /home/jwulf/.config/csprocessor.ini
Loading project configuration from csprocessor.cfg
Connecting to Skynet server: http://skynet.usersys.redhat.com:8080/TopicIndex/

Content Specification ID: 6182
Content Specification Revision: 54278
Content Specification Title: Red Hat Engineers Guide to Zanata

Starting to calculate the statistics...
Total Number of Topics: 31
Number of Topics with XML: 31
Percentage Complete: 100.00%

Comment 1 Lee Newson 2012-07-12 03:32:55 UTC
1) It is just a generic message to show that an error occurred with the topic. However you are correct and it should probably "Invalid Relationship"

2) The reason it only shows one is the error messages show the line based on the reconstruction of the topic's data. Since the relationship failed it wasn't included. This however is a bug and will need to be fixed as it should still be added.

3) If I understand this point correctly you want the text colour to be changed for the part that causes the error? If that is the case then that's not possible to do in Java.

Comment 2 Joshua Wulf 2012-07-12 04:16:33 UTC
With #1, the Relationship is not invalid, it is just ambiguous to the robot what the user intends. Rather than: "you did something wrong!"; "I'm sorry sir/madam, I'm not sure I understand what you want here: could you clarify that for me?"

I cast my vote (for whatever it's worth) for "Ambiguous Relationship" over "Invalid".

With #3, the point is to indicate to the user which part of the line is the cause of the error.

For example, in the line:

Ambiguous Relationship:  Topics that are used twice inside of a Content Specification cannot be related to directly. To relate to one of these topics please use a Target.
 -> Push source material only [6147] [P:6144] [R:6149]

It is not clear whether [P:6144] or [R:6149] is the cause of the error.

So something that indicates to the user which part of the line caused the error is good. Apparently you can change colours on the command line in java: http://linux.byexamples.com/archives/184/print-text-in-colors-with-a-simple-command-line/#comment-98971

But anything that indicates it - highlighting, callout, printing the offending part separately in addition to the whole line, **asterisks**, //slanted lines// - just something to make it clear which part is the error.

Additional information that would be useful would be the lines where the duplicated topics are, in addition to the line where the reference is. So something like:

ERROR: Line 87: Ambiguous Relationship:  Topic 6149 is included on lines 34, 63, and 245 of the Content Specification. To relate to one of these topics please use a Target.
 -> Push source material only [6147] [P:6144] [R:6149]

Note also that the current error message says "twice", but should probably be "more than once".

Comment 3 Lee Newson 2012-07-13 04:35:00 UTC
1) I'm fine with that message so I'll change it in the next version


3) Yes I was aware you can by but that's only valid on certain escape strings however that only works on certain OS's and that draws away from Java's main feature in that it isn't browser dependent (also why I said you can't). Doing this is also a messy hack and not something that I want to do.

I'll take a look at changing the error message with regards to the line numbers. The "twice" component definitely should be "more than once".

Comment 4 Lee Newson 2012-09-20 09:14:31 UTC
Fixed in 0.27.0

As previously mentioned 3 won't be implemented.

As for one, any error messages that related to a relationship being ambiguous. The other relationship error messages still use the invalid relationship message. I've also updated that error message to now say "more than once".

For two the technical notes are below:

Cause:

When relationships were classed as invalid they weren't created into a Target or Topic Relationship. As such they weren't processed by the toString() method that is used in the error messages.

Consequence:

The invalid relationship wasn't being displayed in the error message, and a vague error message is produced.

Fix:

Add a dummy Topic/Target Relationship so that the toString() method will print the invalid relationship in the error message. Also update the error message using the dummy topic details to make the error message say what the invalid relationship is.

Output:

ERROR: Line 22: Invalid Relationship! The Target specified (T5) doesn't exist in the content specification.
       -> Administration Guide Overview [9268] [R: 9271, 9280, T5, T-Test]

Comment 5 Lee Newson 2012-09-20 09:30:07 UTC
Actually, I've removed the "more than once" message instead and added the output you suggested. Example output:

ERROR: Line 22: Ambiguous Relationship! Topic 9266 is included on lines 20 and 30 of the Content Specification. To relate to one of these topics please use a Target.
       -> Administration Guide Overview [9268] [R: 9271, 9266, T-Test]

Comment 6 Lee Newson 2013-06-07 01:31:08 UTC
Closing and setting as current release as no QA was performed by the original reporter. If there is still an issue with this bug still than please re-open it.


Note You need to log in before you can comment on or make changes to this bug.