Rally - Custom Views - Unable to Utilize {user} Variable for Query Dynamic Filtering
search cancel

Rally - Custom Views - Unable to Utilize {user} Variable for Query Dynamic Filtering

book

Article ID: 415716

calendar_today

Updated On:

Products

Rally SaaS

Issue/Introduction

Users are experiencing an issue where custom views do not correctly interpret or resolve the {user} variable within their underlying queries. This variable is crucial for dynamically filtering data based on the currently logged-in user's identity, such as displaying only records associated with that specific user. When {user} is included in a custom view's query, it fails to evaluate to the connected user's value, resulting in inaccurate or incomplete data being displayed, or the query failing entirely. This prevents the creation of personalized views and dashboards that adapt to the user accessing them.

Environment

Rally SAAS

Resolution

Creating a query that shows User Stories owned by the currently logged-in user with an artifact status of either 'In-Progress' or 'Completed.'

The initial query shown below may have worked in APPS based on "APP SDK 2.1" like (Custom list & Custom list 2.0)

  • (((Owner = {user}) OR (Assignee = {user})) AND ((ScheduleState = "In-Progress") OR (ScheduleState = "Completed")))

However, when using the Custom List Widget in Custom Views, the query must be corrected to the following format:

  • (((Owner = currentuser) OR (c_Assignee = currentuser)) AND ((ScheduleState = "In-Progress") OR (ScheduleState = "Completed")))

These required changes are needed when user are trying to implement Query Dynamic  Filtering in a widget:

  1.   * **currentuser**: Ensures the query dynamically shows items for the user who is currently logged in.
     
  2. * **c_Assignee**: The prefix c_ is added for 'Assignee' because it is a custom field and requires this prefix to function correctly.

  3.   * **Quoted Statuses**: Enclose "In-Progress" and "Completed" in quotes so the system correctly recognizes these specific status phrases.