Bug 115300

Summary: Importer does not take account of the preffered="false" attribute in the <item> tag of the LGCL
Product: [Retired] Red Hat Enterprise CMS Reporter: Arturo Dell <arturo.dell>
Component: APLAWSAssignee: Daniel Berrangé <berrange>
Status: CLOSED RAWHIDE QA Contact: Daniel Berrangé <berrange>
Severity: high Docs Contact:
Priority: medium    
Version: nightly   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
URL: http://youth.aplaws.org.uk
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-02-26 15:50:13 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 110728    
Bug Blocks:    

Description Arturo Dell 2004-02-10 13:42:10 UTC
Description of problem: When Importing the LGCL into APLAWS+ every
<item> seems to have the preferred attribute set to "true".


Version-Release number of selected component (if applicable):


How reproducible: Always


This is something Dan discovered looking at the database. Not sure you
would be able to reproduce this behaviour other than by looking at the
Category chooser widget. For example, if you choose the following
category: LGCL --> Community & Living --> Charities
You will see three categories under Charities. These three categories are:
 
<Item Id="104" AddedInVersion="1.00" LastUpdatedInVersion="1.00"
AToZ="false" Preferred="false">
<Name>Charity collections</Name>
<ScopeNotes />
<BroaderItem Id="103" Default="true">Charities</BroaderItem>
<UseItem Id="103">Charities</UseItem>
</Item>
<Item Id="105" AddedInVersion="1.00" LastUpdatedInVersion="1.00"
AToZ="false" Preferred="false">
<Name>Charity register</Name>
<ScopeNotes />
<BroaderItem Id="103" Default="true">Charities</BroaderItem>
<UseItem Id="103">Charities</UseItem>
</Item>
<Item Id="106" AddedInVersion="1.00" LastUpdatedInVersion="1.00"
AToZ="false" Preferred="false">
<Name>Charity shops</Name>
<ScopeNotes />
<BroaderItem Id="103" Default="true">Charities</BroaderItem>
<BroaderItem Id="184" Default="false">Voluntary
organisations</BroaderItem>
<UseItem Id="103">Charities</UseItem>
<UseItem Id="184">Voluntary organisations</UseItem>
</Item>

As you see they all have the preferred="false" attribute but still
appear in the Category widget.
The bug could be that they all get imported with preferred="true" or
that the UI is displaying all categories regardless of true|false in
preferred attribute

Comment 1 Daniel Berrangé 2004-02-19 20:07:10 UTC
The implementation of preferred terms in the importer was incorrect,
being based on the equivalents mapping instead of the 'Preferred'
attribute in the hierarchy mapping. The terms application will be
updated to fix this mistake. Existing data will be  upgradable merely
be re-running the hierarchy builder on the new data files. Preferred
status will be modelled using the 'isEnabled' flag on categories. Thus
non-preferred terms will still be visible in the category admin tabs,
but will be hidden from the authoring kit & public navigation pages.

The first part of this work is completed in p4 40596 (cf bz 110728)

Comment 2 Daniel Berrangé 2004-02-19 20:41:06 UTC
THe second part of the work is done in p4 40599. Need to run data
model upgrade and re-import all the hierarchy xml files.