pub fn remote_projects(value: Option<&Value>) -> Vec<RemoteProject>Expand description
Parse the project references one remote issue reported.
Pure and total, in the shape [crate::sync::mod’s parent parser] is: an
unrecognised payload yields no references — which the import then reports
nothing about — rather than a deserialisation failure that aborts the whole
list. Accepted, for both trackers, because the field’s exact shape is a claim
about a program this repository cannot run:
- an array of ids (
"projects": ["p-1", …]) or of objects; - a single id, or a single object (
"project": {"id": …}); - an object’s id under
id,identifier,key, orproject_id, as a string or a number (iid-style numeric ids are real on the wire); - its name under
name,title, ordisplay_name, as a string.
Entry order is preserved, which is what keeps a round trip byte-stable (NFR-002): reordering here would reorder the local list.
An entry with a name but no id is kept with an empty id, so the import can report it by name instead of dropping it in silence; an entry with neither is not a reference at all and yields nothing.