Metadata objects created via Javascript API always have parent type 'Milestone'
1 1

3 posts in this topic

If I do something like this:

const metadataResult = await session.create(
  'Metadata', {parent_id: "7bd2c20a-f7a1-11ea-8466-005056829324", key: "builds", parent_type: "Breakdown", value: "foo"}
);

...the contents of `metadataResult` will be:

{
  action: "create",
  data: {
    __entity_type__: "Metadata",
    key: "builds",
    parent_id: "7bd2c20a-f7a1-11ea-8466-005056829324",
    parent_type: "Milestone",
    value: "foo"
  }
}

Notice how the `parent_type` key is listed as `Milestone` when it should be `Breakdown`.

For further context, `Breakdown` is a custom object created via the Objects interface and it has the 'Status' box checked.

Share this post


Link to post
Share on other sites

As an additional bit of information, attempting to update the `parent_type` key with `session.update` has no effect.

Metadata created via the Python API, e.g. `breakdown['metadata']['builds'] = "foo"`, has the correct `parent_type`.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
1 1