Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to update values for custom fields used in tm4j test cases using rest api

I am using tm4j for test cases and in test cases we have custom fields like Automation = Not Automated etc. I am able to create test cases using rest api for tm4j for standard fields. But I want to add values to these custom fields as well. How can I do this? I am utilizing Traceablity as well and I need to add value to the weblink field as well. How can I do this?

1 answer

I've used TM4J's REST API a few times to build test cases, but never had to deal with custom fields. The REST API documents for TM4J Server gives an example of referring to custom fields within test cases, so I assume it would be the same for TM4J Cloud.

It seems you refer to the the custom fields as their own array, then reference each custom field by name, like this example:

  "projectKey": "JQA",
  "name": "The name of the Test Case",
  "precondition": "The precondition.",
  "objective": "The objective.",
  "status": "Approved",
  "priority": "Low",
  "estimatedTime": 138000,
  "labels": ["Smoke", "Functional"],
  "issueLinks": ["JQA-123", "JQA-456"],
  "customFields": {
    "myCustomTextField": "The text value you want",
    "myCustomArrayField": ["Value1", "Value2", "Value3"]


The above solution doesn't work. When I make the API call like above I end up getting an error message "myCustomTextField is not a valid field.". I mean doesn't matter if I keep the exact name in the place of custom field I always get same message that the field is not recognized as a valid field.

Here is the response I got from Smartbear support (they own TM4J):


“I'm sorry but unfortunately, we haven't implemented custom fields in the public REST API yet, I'm afraid. So it's not possible to get this information.

We are looking at improving our API and I will add this to the list and inform our Developers.

Apologies for any inconvenience caused I know this is not ideal.”

Like RSinha likes this

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Apps & Integrations

How we use Jira Service Management for our recruitment process! - Part 2

It is never about setting up a process and being done with it. Rather, the focus should always be on optimizing it for the best outcomes. Thus, we didn’t stop at setting up JSM for our recruitment pr...

187 views 0 5
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you