Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Jazz Report Builder filtering custom field in LQE SPARQL doesn't work

 Jazz Report Builder filtering custom field in LQE SPARQL.  Cant filter on a custom field. See ! in web page with warning that starts with "this enumeration property contains values that have conflicting names or".  Currently I have a report in LQE that I am trying to run mathematical functions on aggregates. I want to filter for 2 different types of status of $QM Test Case:Priority$ which are "1-Critical" and "2-High".  These two status correspond to url links of "http://jazz.net/xmlns/prod/jazz/rqm/process/1.0/Priority/literal.priority.120" and "http://jazz.net/xmlns/prod/jazz/rqm/process/1.0/Priority/literal.priority.110". I have no success filtering the total amount of test cases. I have tried count($QM Test Case:Priority$='1-Critical'), I have tried count($QM Test Case:Priority$='literal.priority.120') If I make any changes to the auto generated code all my hyperlinks break.  Below is the auto generated code.


PREFIX dcterms: <http://purl.org/dc/terms/>


SELECT DISTINCT
  ?rqm_merged_QM_20Test_20Plan1_projectArea
  ?rqm_merged_QM_20Test_20Plan1_shortId
  ?rqm_merged_QM_20Test_20Plan1_title
  ?rqm_merged_QM_20Test_20Plan1
  ?rqm_merged_QM_20Test_20Case1_shortId_COUNT
  ?rqm_merged_QM_20Test_20Case1_hasPriority_enumFilterValue_COUNT
  ?rqm_merged_QM_20Test_20Case1_hasPriority_enumFilterValue_COUNT1
  (?rqm_merged_QM_20Test_20Case1_hasPriority_enumFilterValue_COUNT +  ?rqm_merged_QM_20Test_20Case1_hasPriority_enumFilterValue_COUNT1 as ?total)
 
WHERE{
  {
    SELECT DISTINCT
      ?rqm_merged_QM_20Test_20Plan1_projectArea
      ?rqm_merged_QM_20Test_20Plan1_shortId
      ?rqm_merged_QM_20Test_20Plan1_title
      ?rqm_merged_QM_20Test_20Plan1
      (COUNT(DISTINCT ?rqm_merged_QM_20Test_20Case1_shortId) AS ?rqm_merged_QM_20Test_20Case1_shortId_COUNT)
    WHERE{
      ?rqm_merged_QM_20Test_20Plan1_uri oslc_qm:usesTestCase ?rqm_merged_QM_20Test_20Case1_uri.
      ?rqm_merged_QM_20Test_20Plan1_uri oslc:instanceShape ?rqm_merged_QM_20Test_20Plan1_uri_instanceShape.
      ?rqm_merged_QM_20Test_20Plan1_uri_instanceShape merge:mergeShape rqm_merged:QM%20Test%20Plan.
      ?rqm_merged_QM_20Test_20Plan1_uri dcterms:title ?rqm_merged_QM_20Test_20Plan1_title.
      OPTIONAL {
        ?rqm_merged_QM_20Test_20Plan1_uri oslc:shortId ?rqm_merged_QM_20Test_20Plan1_shortId.
      }
      FILTER((!bound(?rqm_merged_QM_20Test_20Plan1_shortId) || str(?rqm_merged_QM_20Test_20Plan1_shortId)= ""))
      OPTIONAL {
        ?rqm_merged_QM_20Test_20Plan1_uri process:projectArea ?rqm_merged_QM_20Test_20Plan1_projectArea_enumValue.
        OPTIONAL {{?rqm_merged_QM_20Test_20Plan1_projectArea_enumValue rdfs:label ?rqm_merged_QM_20Test_20Plan1_projectArea_enumName} UNION {?rqm_merged_QM_20Test_20Plan1_projectArea_enumValue dcterms:title ?rqm_merged_QM_20Test_20Plan1_projectArea_enumName}}
      }
      OPTIONAL {?rqm_merged_QM_20Test_20Plan1_uri process:projectArea ?rqm_merged_QM_20Test_20Plan1_paUri.}
      FILTER( !bound(?rqm_merged_QM_20Test_20Plan1_paUri) || NOT EXISTS{ ?rqm_merged_QM_20Test_20Plan1_paUri oslc:archived true. })
      OPTIONAL {?rqm_merged_QM_20Test_20Plan1_ver dcterms:isVersionOf ?rqm_merged_QM_20Test_20Plan1_uri; rdf:type oslc_config:VersionResource.}
      ?rqm_merged_QM_20Test_20Case1_uri oslc:instanceShape ?rqm_merged_QM_20Test_20Case1_uri_instanceShape.
      ?rqm_merged_QM_20Test_20Case1_uri_instanceShape merge:mergeShape rqm_merged:QM%20Test%20Case.
      OPTIONAL {?rqm_merged_QM_20Test_20Case1_uri process:projectArea ?rqm_merged_QM_20Test_20Case1_paUri.}
      FILTER( !bound(?rqm_merged_QM_20Test_20Case1_paUri) || NOT EXISTS{ ?rqm_merged_QM_20Test_20Case1_paUri oslc:archived true. })
      OPTIONAL {?rqm_merged_QM_20Test_20Case1_ver dcterms:isVersionOf ?rqm_merged_QM_20Test_20Case1_uri; rdf:type oslc_config:VersionResource.}
      ?rqm_merged_QM_20Test_20Case1_uri oslc:shortId ?rqm_merged_QM_20Test_20Case1_shortId.
      BIND( IF (bound(?rqm_merged_QM_20Test_20Plan1_ver), concat(str(?rqm_merged_QM_20Test_20Plan1_uri), "?oslc_config.context="), ?rqm_merged_QM_20Test_20Plan1_uri) as ?rqm_merged_QM_20Test_20Plan1)
      BIND( IF(bound(?rqm_merged_QM_20Test_20Plan1_projectArea_enumName), ?rqm_merged_QM_20Test_20Plan1_projectArea_enumName, IF(bound(?rqm_merged_QM_20Test_20Plan1_projectArea_enumValue), ?rqm_merged_QM_20Test_20Plan1_projectArea_enumValue, "")) as ?rqm_merged_QM_20Test_20Plan1_projectArea)
      BIND( IF (bound(?rqm_merged_QM_20Test_20Case1_ver), concat(str(?rqm_merged_QM_20Test_20Case1_uri), "?oslc_config.context="), ?rqm_merged_QM_20Test_20Case1_uri) as ?rqm_merged_QM_20Test_20Case1)
    }
    GROUP BY ?rqm_merged_QM_20Test_20Plan1_projectArea ?rqm_merged_QM_20Test_20Plan1_shortId ?rqm_merged_QM_20Test_20Plan1_title ?rqm_merged_QM_20Test_20Plan1
  }
  {
    SELECT DISTINCT
      ?rqm_merged_QM_20Test_20Plan1_projectArea
      ?rqm_merged_QM_20Test_20Plan1_shortId
      ?rqm_merged_QM_20Test_20Plan1_title
      ?rqm_merged_QM_20Test_20Plan1
      (COUNT(DISTINCT ?rqm_merged_QM_20Test_20Case1_hasPriority_enumFilterValue_COUNT_filtered) AS ?rqm_merged_QM_20Test_20Case1_hasPriority_enumFilterValue_COUNT)
    WHERE{
      ?rqm_merged_QM_20Test_20Plan1_uri oslc_qm:usesTestCase ?rqm_merged_QM_20Test_20Case1_uri.
      ?rqm_merged_QM_20Test_20Plan1_uri oslc:instanceShape ?rqm_merged_QM_20Test_20Plan1_uri_instanceShape.
      ?rqm_merged_QM_20Test_20Plan1_uri_instanceShape merge:mergeShape rqm_merged:QM%20Test%20Plan.
      ?rqm_merged_QM_20Test_20Plan1_uri dcterms:title ?rqm_merged_QM_20Test_20Plan1_title.
      OPTIONAL {
        ?rqm_merged_QM_20Test_20Plan1_uri oslc:shortId ?rqm_merged_QM_20Test_20Plan1_shortId.
      }
      FILTER((!bound(?rqm_merged_QM_20Test_20Plan1_shortId) || str(?rqm_merged_QM_20Test_20Plan1_shortId)= ""))
      OPTIONAL {
        ?rqm_merged_QM_20Test_20Plan1_uri process:projectArea ?rqm_merged_QM_20Test_20Plan1_projectArea_enumValue.
        OPTIONAL {{?rqm_merged_QM_20Test_20Plan1_projectArea_enumValue rdfs:label ?rqm_merged_QM_20Test_20Plan1_projectArea_enumName} UNION {?rqm_merged_QM_20Test_20Plan1_projectArea_enumValue dcterms:title ?rqm_merged_QM_20Test_20Plan1_projectArea_enumName}}
      }
      OPTIONAL {?rqm_merged_QM_20Test_20Plan1_uri process:projectArea ?rqm_merged_QM_20Test_20Plan1_paUri.}
      FILTER( !bound(?rqm_merged_QM_20Test_20Plan1_paUri) || NOT EXISTS{ ?rqm_merged_QM_20Test_20Plan1_paUri oslc:archived true. })
      OPTIONAL {?rqm_merged_QM_20Test_20Plan1_ver dcterms:isVersionOf ?rqm_merged_QM_20Test_20Plan1_uri; rdf:type oslc_config:VersionResource.}
      ?rqm_merged_QM_20Test_20Case1_uri oslc:instanceShape ?rqm_merged_QM_20Test_20Case1_uri_instanceShape.
      ?rqm_merged_QM_20Test_20Case1_uri_instanceShape merge:mergeShape rqm_merged:QM%20Test%20Case.
      OPTIONAL {?rqm_merged_QM_20Test_20Case1_uri process:projectArea ?rqm_merged_QM_20Test_20Case1_paUri.}
      FILTER( !bound(?rqm_merged_QM_20Test_20Case1_paUri) || NOT EXISTS{ ?rqm_merged_QM_20Test_20Case1_paUri oslc:archived true. })
      OPTIONAL {?rqm_merged_QM_20Test_20Case1_ver dcterms:isVersionOf ?rqm_merged_QM_20Test_20Case1_uri; rdf:type oslc_config:VersionResource.}
      OPTIONAL {
        ?rqm_merged_QM_20Test_20Case1_uri rqm_process:hasPriority ?rqm_merged_QM_20Test_20Case1_hasPriority_enumValue.
        OPTIONAL {?rqm_merged_QM_20Test_20Case1_hasPriority_enumValue owl:sameAs ?rqm_merged_QM_20Test_20Case1_hasPriority_enumSameAs.}
        OPTIONAL {{?rqm_merged_QM_20Test_20Case1_hasPriority_enumValue rdfs:label ?rqm_merged_QM_20Test_20Case1_hasPriority_enumName} UNION {?rqm_merged_QM_20Test_20Case1_hasPriority_enumValue dcterms:title ?rqm_merged_QM_20Test_20Case1_hasPriority_enumName}}
      }
      BIND( COALESCE(?rqm_merged_QM_20Test_20Case1_hasPriority_enumSameAs, ?rqm_merged_QM_20Test_20Case1_hasPriority_enumValue) as ?rqm_merged_QM_20Test_20Case1_hasPriority_enumFilterValue)
      BIND( IF(bound(?rqm_merged_QM_20Test_20Case1_hasPriority_enumName), ?rqm_merged_QM_20Test_20Case1_hasPriority_enumName, IF(bound(?rqm_merged_QM_20Test_20Case1_hasPriority_enumValue), ?rqm_merged_QM_20Test_20Case1_hasPriority_enumValue, "")) as ?rqm_merged_QM_20Test_20Case1_hasPriority)
      BIND( IF(?rqm_merged_QM_20Test_20Case1_hasPriority_enumFilterValue=<http://jazz.net/xmlns/prod/jazz/rqm/process/1.0/Priority/literal.priority.110>, ?rqm_merged_QM_20Test_20Case1_uri, ?ignoreResource) AS ?rqm_merged_QM_20Test_20Case1_hasPriority_enumFilterValue_COUNT_filtered)
      BIND( IF (bound(?rqm_merged_QM_20Test_20Plan1_ver), concat(str(?rqm_merged_QM_20Test_20Plan1_uri), "?oslc_config.context="), ?rqm_merged_QM_20Test_20Plan1_uri) as ?rqm_merged_QM_20Test_20Plan1)
      BIND( IF(bound(?rqm_merged_QM_20Test_20Plan1_projectArea_enumName), ?rqm_merged_QM_20Test_20Plan1_projectArea_enumName, IF(bound(?rqm_merged_QM_20Test_20Plan1_projectArea_enumValue), ?rqm_merged_QM_20Test_20Plan1_projectArea_enumValue, "")) as ?rqm_merged_QM_20Test_20Plan1_projectArea)
      BIND( IF (bound(?rqm_merged_QM_20Test_20Case1_ver), concat(str(?rqm_merged_QM_20Test_20Case1_uri), "?oslc_config.context="), ?rqm_merged_QM_20Test_20Case1_uri) as ?rqm_merged_QM_20Test_20Case1)
    }
    GROUP BY ?rqm_merged_QM_20Test_20Plan1_projectArea ?rqm_merged_QM_20Test_20Plan1_shortId ?rqm_merged_QM_20Test_20Plan1_title ?rqm_merged_QM_20Test_20Plan1
  }
  {
    SELECT DISTINCT
      ?rqm_merged_QM_20Test_20Plan1_projectArea
      ?rqm_merged_QM_20Test_20Plan1_shortId
      ?rqm_merged_QM_20Test_20Plan1_title
      ?rqm_merged_QM_20Test_20Plan1
      (COUNT(DISTINCT ?rqm_merged_QM_20Test_20Case1_hasPriority_enumFilterValue_COUNT1_filtered) AS ?rqm_merged_QM_20Test_20Case1_hasPriority_enumFilterValue_COUNT1)
    WHERE{
      ?rqm_merged_QM_20Test_20Plan1_uri oslc_qm:usesTestCase ?rqm_merged_QM_20Test_20Case1_uri.
      ?rqm_merged_QM_20Test_20Plan1_uri oslc:instanceShape ?rqm_merged_QM_20Test_20Plan1_uri_instanceShape.
      ?rqm_merged_QM_20Test_20Plan1_uri_instanceShape merge:mergeShape rqm_merged:QM%20Test%20Plan.
      ?rqm_merged_QM_20Test_20Plan1_uri dcterms:title ?rqm_merged_QM_20Test_20Plan1_title.
      OPTIONAL {
        ?rqm_merged_QM_20Test_20Plan1_uri oslc:shortId ?rqm_merged_QM_20Test_20Plan1_shortId.
      }
      FILTER((!bound(?rqm_merged_QM_20Test_20Plan1_shortId) || str(?rqm_merged_QM_20Test_20Plan1_shortId)= ""))
      OPTIONAL {
        ?rqm_merged_QM_20Test_20Plan1_uri process:projectArea ?rqm_merged_QM_20Test_20Plan1_projectArea_enumValue.
        OPTIONAL {{?rqm_merged_QM_20Test_20Plan1_projectArea_enumValue rdfs:label ?rqm_merged_QM_20Test_20Plan1_projectArea_enumName} UNION {?rqm_merged_QM_20Test_20Plan1_projectArea_enumValue dcterms:title ?rqm_merged_QM_20Test_20Plan1_projectArea_enumName}}
      }
      OPTIONAL {?rqm_merged_QM_20Test_20Plan1_uri process:projectArea ?rqm_merged_QM_20Test_20Plan1_paUri.}
      FILTER( !bound(?rqm_merged_QM_20Test_20Plan1_paUri) || NOT EXISTS{ ?rqm_merged_QM_20Test_20Plan1_paUri oslc:archived true. })
      OPTIONAL {?rqm_merged_QM_20Test_20Plan1_ver dcterms:isVersionOf ?rqm_merged_QM_20Test_20Plan1_uri; rdf:type oslc_config:VersionResource.}
      ?rqm_merged_QM_20Test_20Case1_uri oslc:instanceShape ?rqm_merged_QM_20Test_20Case1_uri_instanceShape.
      ?rqm_merged_QM_20Test_20Case1_uri_instanceShape merge:mergeShape rqm_merged:QM%20Test%20Case.
      OPTIONAL {?rqm_merged_QM_20Test_20Case1_uri process:projectArea ?rqm_merged_QM_20Test_20Case1_paUri.}
      FILTER( !bound(?rqm_merged_QM_20Test_20Case1_paUri) || NOT EXISTS{ ?rqm_merged_QM_20Test_20Case1_paUri oslc:archived true. })
      OPTIONAL {?rqm_merged_QM_20Test_20Case1_ver dcterms:isVersionOf ?rqm_merged_QM_20Test_20Case1_uri; rdf:type oslc_config:VersionResource.}
      OPTIONAL {
        ?rqm_merged_QM_20Test_20Case1_uri rqm_process:hasPriority ?rqm_merged_QM_20Test_20Case1_hasPriority_enumValue.
        OPTIONAL {?rqm_merged_QM_20Test_20Case1_hasPriority_enumValue owl:sameAs ?rqm_merged_QM_20Test_20Case1_hasPriority_enumSameAs.}
        OPTIONAL {{?rqm_merged_QM_20Test_20Case1_hasPriority_enumValue rdfs:label ?rqm_merged_QM_20Test_20Case1_hasPriority_enumName} UNION {?rqm_merged_QM_20Test_20Case1_hasPriority_enumValue dcterms:title ?rqm_merged_QM_20Test_20Case1_hasPriority_enumName}}
      }
      BIND( COALESCE(?rqm_merged_QM_20Test_20Case1_hasPriority_enumSameAs, ?rqm_merged_QM_20Test_20Case1_hasPriority_enumValue) as ?rqm_merged_QM_20Test_20Case1_hasPriority_enumFilterValue)
      BIND( IF(bound(?rqm_merged_QM_20Test_20Case1_hasPriority_enumName), ?rqm_merged_QM_20Test_20Case1_hasPriority_enumName, IF(bound(?rqm_merged_QM_20Test_20Case1_hasPriority_enumValue), ?rqm_merged_QM_20Test_20Case1_hasPriority_enumValue, "")) as ?rqm_merged_QM_20Test_20Case1_hasPriority)
      BIND( IF(?rqm_merged_QM_20Test_20Case1_hasPriority_enumFilterValue=<http://jazz.net/xmlns/prod/jazz/rqm/process/1.0/Priority/literal.priority.120>, ?rqm_merged_QM_20Test_20Case1_uri, ?ignoreResource) AS ?rqm_merged_QM_20Test_20Case1_hasPriority_enumFilterValue_COUNT1_filtered)
      BIND( IF (bound(?rqm_merged_QM_20Test_20Plan1_ver), concat(str(?rqm_merged_QM_20Test_20Plan1_uri), "?oslc_config.context="), ?rqm_merged_QM_20Test_20Plan1_uri) as ?rqm_merged_QM_20Test_20Plan1)
      BIND( IF(bound(?rqm_merged_QM_20Test_20Plan1_projectArea_enumName), ?rqm_merged_QM_20Test_20Plan1_projectArea_enumName, IF(bound(?rqm_merged_QM_20Test_20Plan1_projectArea_enumValue), ?rqm_merged_QM_20Test_20Plan1_projectArea_enumValue, "")) as ?rqm_merged_QM_20Test_20Plan1_projectArea)
      BIND( IF (bound(?rqm_merged_QM_20Test_20Case1_ver), concat(str(?rqm_merged_QM_20Test_20Case1_uri), "?oslc_config.context="), ?rqm_merged_QM_20Test_20Case1_uri) as ?rqm_merged_QM_20Test_20Case1)
    }
    GROUP BY ?rqm_merged_QM_20Test_20Plan1_projectArea ?rqm_merged_QM_20Test_20Plan1_shortId ?rqm_merged_QM_20Test_20Plan1_title ?rqm_merged_QM_20Test_20Plan1
  }

0 votes


Be the first one to answer this question!

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 12,020

Question asked: Jan 02 '20, 2:54 p.m.

Question was seen: 1,023 times

Last updated: Jan 02 '20, 2:54 p.m.

Confirmation Cancel Confirm