Join 34,000+ subscribers and receive articles from our
blog about software quality, testing, QA and security.

Querying for Custom Fields set to a Project



Is there a better way to query for custom fields set to a project under customization?

To find out what all custom fields are set for a specific project, I’m currently querying the testrail.fields table and for each field I am checking the configs column, parsing the config column to identify if it is selected for the project which I am concerned about. I find this as a bit of a cumbersome process.

Is there a better way of identifying them? Or is it possible to have a table/API call to identify all custom fields set to a project?



Hi Sanath,

Thanks for your posting! You can also use the get_case_fields and get_result_fields API methods:

The response is similar to how the fields are stored in the database though so there’s no big difference here. The idea is to get the list of all fields and then check the project IDs and/or include-all attribute to see if a field applies to a project or not.