The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Agile Board - Filter the backlog on the Sprint Planning tab

John Tomko
Tera Expert

Apologies, I have seen several community posts on this question, but having tried the suggested actions, I am not having any luck.

I want the "Backlog" section of the Sprint Planning Tab on the Agile Board to only show stories that are ready, not blocked, not assigned to a Sprint, and are assigned to the group selected at the top of the board.

In effect, I want this query:

sys_class_name=rm_story^active=true^sprintISEMPTY^stateNOT IN-6,3,4^blocked!=true^assignment_group=[System ID of selected Agile group]

I can modify the UI Macro "sprint_planning", and the changes I make are reflected when I view the board, so I'm pretty confident I am looking at the right thing.  It looks like what I need to modify is on line 55:

{{sp.metadata.backlog.query}}

Of course, I don't want to "hard code" the query.  So, I guess my question is, where does {{sp.metadata.backlog.query}} come from and how do I modify it?

From what I've read, I need to modify function "SdlcList.prototype.updateListFilter" in UI Script SdlcList.  I've tried modifying the query at line 23, but am not seeing any changes to what is displayed.

//OOTB ServiceNow Query
//this.filterQuery = "sys_class_name=rm_story^sprintISEMPTY^state=1^blocked!=true^" + this.pageContext + "=" + this.pageContextId;
		
//Custom Query
this.filterQuery = "sys_class_name=rm_story^active=true^sprintISEMPTY^stateNOT IN-6,3,4^blocked!=true^" + this.pageContext + "=" + this.pageContextId;

I am still seeing the default query.  I added that to the sprint_planning UI Macro so I could verify, and the value for "{{sp.metadata.backlog.query}}" is 

^ORDERBYglobal_rank^sys_class_name=rm_story^active=true^sprintISEMPTY^assignment_group=[Sys ID of selected Agile Group]

(with a valid Sys ID in place of "[Sys ID of selected Agile Group]"

 

For what it's worth, we are on San Diego and Agile Development 2.0

1 ACCEPTED SOLUTION

John Tomko
Tera Expert

I was able to resolve this issue by modifying UI Macro "sprint_planning".  I'm still not certain why the modifications to sdlclist didn't work, and I don't love "hard-coding" a query in an OOTB UI macro, but the following meets my needs:

At line 59, replaced

additional-query="{{sp.additionalQuery}}"

with

additional-query="stateNOT IN-6,3,4^blocked!=true"

View solution in original post

7 REPLIES 7

phsdm
Giga Expert

(How do we submit a feature request? I can never find the place.)

 

On the Agile Board's Backlog tab, I can use the pencil to edit the filter. The editor is a form against the Personal Backlogs [backlog_definition] table. If I modify the method above to use the query from that record, I will be close to what I want.

phsdm_0-1680189118369.png


This is another one of those odd patterns like hierarchical templates. Project, Story, and Triage Definition "point to" Personal Backlog, instead of having Personal Backlog as a related list. This makes it impossible for Personal Backlog to truly be personal, and it isn't. It also results in squirrely code because of the "pointer" approach instead of a relational model. It looks like Story's backlog_definition and backlog_type are vestigial. Also, it seems weird to me that the filter does not relate to Product as well as, or instead of, Product. I think of product backlogs in hybrid or agile development cycles. Projects have sprints, but the backlog is forever.

 

Also, Backlog is not populated for the Project record I am interested in. I was going to join Story:Project:Backlog, but that won't work. Since other projects have it populated, I guess there is some squirrely code and process around populating it. (It is not on my form.) Can someone provide steps for the process to associate a Personal Backlog with a Project?

DorianK
Tera Expert

Just in case someone stumbles upon this, you don't need to hardcode that UI macro anymore or modify AgileBoardMetaDataCommonUtil (at least in Vancouver+). Modifying AgileBoardMetaDataCommonUtil is useful if you needed an experience across all 3 - but since there are 3 separate ones that control logic, there are better places to make the change. There are useful script includes that control this logic.

 

The 3 that control the tabs are:

global.SprintPlanningMetaDataService
global.BacklogMetaDataService
global.SprintTrackingMetaDataService

 

The 1 that controls the whole board:

global.AgileBoardMetaDataService

 

Which is then called by the UI macro (html_page_agile_board) to provide the expected experience.

 

The proper way would probably be to create an extension point and override the function (this wouldn't cause skip logs but could potentially break in the future if the logic drastically changes in these functions). The easy way is just to modify the "query" that exists in these script includes and this will track skip records if need be in the future :]

Incredibly helpful! Thank you!