Bug 231491 - Unmapped (non-default) mapping in orm.xml displayes incorrect text on details pane
Summary: Unmapped (non-default) mapping in orm.xml displayes incorrect text on details...
Status: VERIFIED FIXED
Alias: None
Product: Dali JPA Tools
Classification: WebTools
Component: General (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows XP
: P1 normal (vote)
Target Milestone: 2.0 RC1   Edit
Assignee: Karen Butzke CLA
QA Contact:
URL:
Whiteboard: PMC_approved
Keywords: PII
Depends on:
Blocks:
 
Reported: 2008-05-12 01:39 EDT by Neil Hauge CLA
Modified: 2008-06-03 10:22 EDT (History)
1 user (show)

See Also:
neil.hauge: pmc_approved? (david_williams)
neil.hauge: pmc_approved? (raghunathan.srinivasan)
neil.hauge: pmc_approved? (naci.dai)
neil.hauge: pmc_approved? (deboer)
neil.hauge: pmc_approved+
neil.hauge: pmc_approved? (kaloyan)


Attachments
proposed patch - HEAD (5.85 KB, patch)
2008-05-13 11:31 EDT, Karen Butzke CLA
no flags Details | Diff
proposed patch - HEAD (3.15 KB, patch)
2008-05-14 19:40 EDT, Karen Butzke CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Neil Hauge CLA 2008-05-12 01:39:27 EDT
Found this testing the fix for bug 231147.

The text in the details reads, "Attribute 'foo' is not mapped, click here to change the mapping type."  Nothing in this statement is linked, and I'm not sure what the intent was here (to add and map?).  Or, should the text just be changed to "Attribute foo is not mapped."  (this would be my choice)

In addition, the Add Attribute to XML menu item is disabled for this mapping.  This should be enabled.
Comment 1 Karen Butzke CLA 2008-05-12 08:17:20 EDT
I could see this being an 'Add and map' link, this would complement the right-click menu option.

'Add Attribute to Xml' should be disabled for an unmapped mapping.  Then the user has to choose a mapping type by using the other action, otherwise we don't know what type of mapping to add to the orm.xml
Comment 2 Neil Hauge CLA 2008-05-12 11:13:29 EDT
(In reply to comment #1)
> I could see this being an 'Add and map' link, this would complement the
> right-click menu option.

That sounds good.

> 
> 'Add Attribute to Xml' should be disabled for an unmapped mapping.  Then the
> user has to choose a mapping type by using the other action, otherwise we don't
> know what type of mapping to add to the orm.xml
> 

Yes.  Apparently I need to stop entering bugs after 1AM.
Comment 3 Karen Butzke CLA 2008-05-13 11:31:30 EDT
Created attachment 99968 [details]
proposed patch - HEAD

These are the current strings used for attribute mapping labels:

mapped attribute
   Attribute '<name>' is mapped as *basic*.

unmapped attribute in java
   Attribute '<name>' is not mapped, click *here* to change the mapping type.


options for orm.xml virtual attribute (mapped or unmapped in java):
Attribute '<name>' is not mapped here, *add attribute to xml and map*.

Attribute '<name>' is not mapped here, click *here* to add attribute to xml and map.

Patch attached has first option for orm.xml virtual mapping. Thoughts?
Comment 4 Neil Hauge CLA 2008-05-13 12:13:30 EDT
I like the first option.  I'll test it out and submit for approval.
Comment 5 Karen Butzke CLA 2008-05-14 19:40:38 EDT
Created attachment 100332 [details]
proposed patch - HEAD

new patch just changes the text for virtual orm.xml attribute mappings.  Adding the link was causing problems with selection in the structure view after adding the attribute to the xml.  Now instead of:

"Attribute 'foo' is not mapped, click here to change the mapping type."

the text just says:

"Attribute 'foo' is not mapped."


I will enter another bug to handle the larger issue of updating the text for java unmapped mappings and changing this to be a link that uses the 'command' defined in the structure view.
Comment 6 Neil Hauge CLA 2008-05-14 20:04:51 EDT
This bug addresses a broken link in a Details view label. The change required is minimal, in that it basically removes the link from the UI.  This is a very low-risk change, simple change.  I have tested the various scenarios, and everything looks good.  Approved.

Requesting PMC approval.
Comment 7 Neil Hauge CLA 2008-05-14 23:37:40 EDT
Tentatively approving so we can meet the RC1 deadline.  Changes can be rolled back if necessary.
Comment 8 Karen Butzke CLA 2008-05-14 23:42:38 EDT
patch checked in to HEAD
Comment 9 Jolene Moffitt CLA 2008-05-29 21:38:25 EDT
Verified in wtp build RC2-20080525035205 - RC2-20080525035205.zip

Verified that when you select the 'foo' attribute in the orm.xml structure the details pane shows "Attribute 'foo' is not mapped."
Comment 10 Karen Butzke CLA 2008-06-03 10:22:48 EDT
verified by Jolene