@@ -465,6 +465,95 @@ QUnit.module('Hierarchies', stubsEnvironment, () => {
465465 assert . equal ( query , 'with set [DX_columns] as NonEmpty({[Product].[Product Categories].[All],[Product].[Product Categories].[Category]}, {[Measures].[Customer Count]}) set [DX_rows] as NonEmpty({Descendants({[Ship Date].[Calendar].[Month].&[2003]&[8]}, [Ship Date].[Calendar].[Date], SELF_AND_BEFORE)}, {[Measures].[Customer Count]}) SELECT CrossJoin([DX_columns],{[Measures].[Customer Count]}) DIMENSION PROPERTIES PARENT_UNIQUE_NAME,HIERARCHY_UNIQUE_NAME, MEMBER_VALUE ON columns,[DX_rows] DIMENSION PROPERTIES PARENT_UNIQUE_NAME,HIERARCHY_UNIQUE_NAME, MEMBER_VALUE ON rows FROM [Adventure Works] CELL PROPERTIES VALUE, FORMAT_STRING, LANGUAGE, BACK_COLOR, FORE_COLOR, FONT_FLAGS' ) ;
466466 } ) ;
467467
468+ QUnit . test ( 'T1283598. Hierarchy slice should not duplicate hierarchy prefix when path value is a full unique name' , function ( assert ) {
469+ this . store . load ( {
470+ columns : [ { dataField : '[Active Month].[Active Month]' } ] ,
471+ rows : [
472+ { dataField : '[Product].[Product Purchaser Type].[Purchaser Type]' , hierarchyName : '[Product].[Product Purchaser Type]' } ,
473+ { dataField : '[Product].[Product Purchaser Type].[Purchaser Sub Type]' , hierarchyName : '[Product].[Product Purchaser Type]' } ,
474+ { dataField : '[Product].[Product Nbr]' }
475+ ] ,
476+ values : [ { dataField : '[Measures].[Members]' , caption : 'Members' } ] ,
477+ headerName : 'rows' ,
478+ path : [
479+ '[Product].[Product Purchaser Type].[Purchaser Type].&[Commercial]' ,
480+ '[Product].[Product Purchaser Type].[Purchaser Type].&[Commercial].&[Group]'
481+ ]
482+ } ) ;
483+ const query = this . getQuery ( ) ;
484+
485+ assert . notStrictEqual (
486+ query . indexOf ( 'WHERE ([Product].[Product Purchaser Type].[Purchaser Type].&[Commercial].&[Group])' ) ,
487+ - 1 ,
488+ 'WHERE slice contains the full unique name once'
489+ ) ;
490+ assert . strictEqual (
491+ query . indexOf ( '[Product].[Product Purchaser Type].[Purchaser Sub Type].[Product].[Product Purchaser Type]' ) ,
492+ - 1 ,
493+ 'WHERE slice does not duplicate the hierarchy prefix'
494+ ) ;
495+ } ) ;
496+
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+
468557 QUnit . test ( 'Hierarchy. Expand child when opposite axis expanded on several levels' , function ( assert ) {
469558 this . store . load ( {
470559 columns : [ {
0 commit comments