Can custom fields of type WebLink be queried?

Document ID : KB000057576
Last Modified Date : 14/02/2018
Show Technical Document Details


A user needs to query another system's defect ID in a CA Agile Central WebLink custom field but it is not working.


WebLink type custom fields is not queriable. This is the reason that all CA Agile Central connectors use String type of custom field and not WebLink type to reference an artifact in another system.

Below is a screenshot from WS API object model. It notes that "This attribute cannot be used in queries"

User-added image

Since it is not possible to query by WebLink any programmatic solution would involve querying artifacts by some other criteria, and later filtering the results as shown in this Ruby example based on CA Agile Central API Toolkit for Ruby.
require 'rally_api'

headers = = "Create stories and tasks"
headers.vendor = "Nick M RallyLab"
headers.version = "1.0"

config = {:base_url => ""}
config[:api_key] = "_abc123"  
config[:workspace] = "W1" 
config[:project] = "Team1"
config[:headers] = headers 
config[:version] = "v2.0"

@rally =

workspace = ""
project = ""

query =
query.type = "defect"
query.fetch = "Name,FormattedID,c_MyWebLink"
query.workspace = {"_ref" => workspace }
query.project = {"_ref" => project }
query.query_string = "(Tags.Name = \"tag1\")"
query.limit = 2 

results = @rally.find(query)

defects_with_empty_link = []
defects_with_link = []

results.each do |defect|
  puts defect.Name    
  if defect.c_MyWebLink.LinkID.nil?
    defects_with_empty_link << defect
    defects_with_link << defect

puts "----------EMPTY WEB LINK----------"
defects_with_empty_link.each do |defect|
  puts "#{defect.FormattedID}, WebLink: #{defect.c_MyWebLink.LinkID}"

puts "---------WEB LINK-----------------"
defects_with_link.each do |defect|
  puts "#{defect.FormattedID}, WebLink: #{defect.c_MyWebLink.LinkID}"

NOTE: the code example is available as is. It is not supported by CA Agile Central.