Skip to content

How to get source id for item #321

@matthijskooijman

Description

@matthijskooijman

I'm looking to identify which items are linked to the same source (more specifically, when iterating over all items, only process one item for each linked source and skipping subsequent ways). An obvious way to do so would be to get the id of the source linked to an item and see if that id is the same.

It think I can do this using Item._srcId, but that's of course an internal property. There does not seem to be an Item.getSourceId() or so, would that be worth adding?

I could of course do getSource().getId(), but that involves several async requests (since getSource() requests config rather than using this._xmlparams which I suspect is the same, and getId() for a source requests prop:srcid rather than returning just this._srcId, for reasons I don't follow) and constructs a new object, which should not really be needed.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions