@@ -494,6 +494,66 @@ QUnit.module('Hierarchies', stubsEnvironment, () => {
494494 ) ;
495495 } ) ;
496496
497+ QUnit . test ( 'T1283598. Axis SET should not duplicate hierarchy prefix when expanded path value is a full unique name' , function ( assert ) {
498+ this . store . load ( {
499+ columns : [ { dataField : '[Active Month].[Active Month]' } ] ,
500+ rows : [
501+ { dataField : '[Product].[Product Purchaser Type].[Purchaser Type]' , hierarchyName : '[Product].[Product Purchaser Type]' } ,
502+ { dataField : '[Product].[Product Purchaser Type].[Purchaser Sub Type]' , hierarchyName : '[Product].[Product Purchaser Type]' } ,
503+ { dataField : '[Product].[Product Nbr]' }
504+ ] ,
505+ values : [ { dataField : '[Measures].[Members]' , caption : 'Members' } ] ,
506+ rowExpandedPaths : [
507+ [ '[Product].[Product Purchaser Type].[Purchaser Type].&[Commercial]' ] ,
508+ [ '[Product].[Product Purchaser Type].[Purchaser Type].&[Commercial]' , '[Product].[Product Purchaser Type].[Purchaser Type].&[Commercial].&[Group]' ]
509+ ]
510+ } ) ;
511+ const query = this . getQuery ( ) ;
512+
513+ assert . notStrictEqual (
514+ query . indexOf ( '([Product].[Product Purchaser Type].[Purchaser Type].&[Commercial].&[Group])' ) ,
515+ - 1 ,
516+ 'axis SET contains the full unique name once'
517+ ) ;
518+ assert . strictEqual (
519+ query . indexOf ( '[Product].[Product Purchaser Type].[Purchaser Sub Type].[Product].[Product Purchaser Type]' ) ,
520+ - 1 ,
521+ 'axis SET does not duplicate the hierarchy prefix'
522+ ) ;
523+ } ) ;
524+
525+ QUnit . test ( 'T1283598. Drill-down WHERE slice should not duplicate hierarchy prefix when path value is a full unique name' , function ( assert ) {
526+ this . store . getDrillDownItems ( {
527+ columns : [ { dataField : '[Active Month].[Active Month]' } ] ,
528+ rows : [
529+ { dataField : '[Product].[Product Purchaser Type].[Purchaser Type]' , hierarchyName : '[Product].[Product Purchaser Type]' } ,
530+ { dataField : '[Product].[Product Purchaser Type].[Purchaser Sub Type]' , hierarchyName : '[Product].[Product Purchaser Type]' } ,
531+ { dataField : '[Product].[Product Nbr]' }
532+ ] ,
533+ values : [ { dataField : '[Measures].[Members]' , caption : 'Members' } ]
534+ } , {
535+ columnPath : [ ] ,
536+ rowPath : [
537+ '[Product].[Product Purchaser Type].[Purchaser Type].&[Commercial]' ,
538+ '[Product].[Product Purchaser Type].[Purchaser Type].&[Commercial].&[Group]'
539+ ] ,
540+ dataIndex : 0 ,
541+ maxRowCount : 100
542+ } ) ;
543+ const query = this . getQuery ( ) ;
544+
545+ assert . notStrictEqual (
546+ query . indexOf ( 'WHERE ([Product].[Product Purchaser Type].[Purchaser Type].&[Commercial].&[Group])' ) ,
547+ - 1 ,
548+ 'drill-down WHERE slice contains the full unique name once'
549+ ) ;
550+ assert . strictEqual (
551+ query . indexOf ( '[Product].[Product Purchaser Type].[Purchaser Sub Type].[Product].[Product Purchaser Type]' ) ,
552+ - 1 ,
553+ 'drill-down WHERE slice does not duplicate the hierarchy prefix'
554+ ) ;
555+ } ) ;
556+
497557 QUnit . test ( 'Hierarchy. Expand child when opposite axis expanded on several levels' , function ( assert ) {
498558 this . store . load ( {
499559 columns : [ {
0 commit comments