[ { "@id": "https://w3id.org/np/RAXLyQFTqT9TBlnkhDR38Hld_M-2WTEGfiZq5BzpWHqQE/provenance", "@graph": [ { "@id": "https://w3id.org/np/RAXLyQFTqT9TBlnkhDR38Hld_M-2WTEGfiZq5BzpWHqQE/assertion", "http://www.w3.org/ns/prov#wasAttributedTo": [ { "@id": "https://orcid.org/0000-0002-1267-0234" } ] } ] }, { "@id": "https://w3id.org/np/RAXLyQFTqT9TBlnkhDR38Hld_M-2WTEGfiZq5BzpWHqQE/assertion", "@graph": [ { "@id": "https://w3id.org/np/RAXLyQFTqT9TBlnkhDR38Hld_M-2WTEGfiZq5BzpWHqQE/get-nanosuggestions", "http://purl.org/dc/terms/description": [ { "@value": "Returns the nanosuggestions (issues, bug reports, feature requests and tasks) linked to a given space or maintained resource via gen:isRelevantFor, with kind, current status, current assignee, comment count, reporter and date. Anybody may link a nanosuggestion to a resource, but status and assignment are resolved per space: the most recent assertion by a current member (admin, maintainer or member, not observer) of that space wins; if no member has ever set a status, the most recent one from outside is shown and marked as such; with no status at all the nanosuggestion counts as open. Also returns the assignment nanopublication that currently wins, so that an assign action can seed its form from it and arrive pre-filled with the current assignees." } ], "http://purl.org/dc/terms/license": [ { "@id": "http://www.apache.org/licenses/LICENSE-2.0" } ], "@type": [ "https://w3id.org/kpxl/grlc/grlc-query" ], "http://www.w3.org/2000/01/rdf-schema#label": [ { "@value": "Get nanosuggestions for a resource" } ], "https://w3id.org/kpxl/grlc/endpoint": [ { "@id": "https://w3id.org/np/l/nanopub-query-1.1/repo/type/29e2f808e4864fca4930806dee70c4a32df54a63ee90156244910a47d3443736" } ], "https://w3id.org/kpxl/grlc/sparql": [ { "@value": "\nprefix rdf: \nprefix rdfs: \nprefix dct: \nprefix foaf: \nprefix np: \nprefix npa: \nprefix npx: \nprefix schema: \nprefix as: \nprefix gen: \nprefix nsug: \n\nselect ?item_multi_iri ?item_label_multi ?kind ?status ?assignee ?assignee_label\n ?comments_multi_iri ?comments_label_multi ?reporter ?reporter_label ?date\n ?suggestion ?np ?fill_source\nwhere {\n graph npa:graph {\n ?np npa:hasValidSignatureForPublicKeyHash ?pubkey .\n filter not exists { ?npi npx:invalidates ?np ; npa:hasValidSignatureForPublicKeyHash ?pubkey . }\n ?np dct:created ?date .\n ?np np:hasAssertion ?a .\n optional { ?np dct:creator ?reporter }\n }\n graph ?a {\n ?suggestion a nsug:Nanosuggestion ; rdfs:label ?title .\n optional { ?suggestion a ?k . filter(?k != nsug:Nanosuggestion && ?k != schema:Statement) }\n }\n filter exists {\n graph npa:graph {\n ?lnp npa:hasValidSignatureForPublicKeyHash ?lpk ; np:hasAssertion ?la .\n filter not exists { ?lnpi npx:invalidates ?lnp ; npa:hasValidSignatureForPublicKeyHash ?lpk . }\n }\n graph ?la {\n values ?_resource_multi_iri {}\n ?suggestion gen:isRelevantFor ?_resource_multi_iri .\n }\n }\n optional {\n { select ?suggestion (max(concat(if(?fm,'1','0'), ?sd, ' ', str(?s))) as ?pick) where {\n service {\n select (group_concat(?mpk; separator=' ') as ?memberPubkeys) where {\n graph npa:graph { npa:thisRepo npa:hasCurrentSpaceState ?stateG . }\n values ?_resource_multi_iri {}\n graph ?stateG {\n ?_resource_multi_iri npa:isMaintainedBy? ?space .\n ?ri a gen:RoleInstantiation ; npa:forSpace ?space ; npa:forAgent ?agent ; npa:hasRoleType ?rt .\n filter(?rt in (gen:AdminRole, gen:MaintainerRole, gen:MemberRole))\n ?acct a npa:AccountState ; npa:agent ?agent ; npa:pubkey ?mpk .\n }\n }\n }\n graph npa:graph {\n ?snp npa:hasValidSignatureForPublicKeyHash ?spk ; np:hasAssertion ?sa ; dct:created ?sdate .\n filter not exists { ?snpi npx:invalidates ?snp ; npa:hasValidSignatureForPublicKeyHash ?spk . }\n }\n graph ?sa { ?suggestion schema:actionStatus ?s . }\n bind(str(?sdate) as ?sd)\n bind(contains(?memberPubkeys, ?spk) as ?fm)\n } group by ?suggestion }\n }\n bind(coalesce(iri(strafter(?pick, ' ')), schema:PotentialActionStatus) as ?st)\n bind(coalesce(substr(?pick, 1, 1) = '0', false) as ?outside)\n bind(if(?st = schema:CompletedActionStatus, 'done',\n if(?st = schema:FailedActionStatus, 'rejected',\n if(?st = schema:ActiveActionStatus, 'in progress', 'open'))) as ?st_label)\n bind(if(?outside, concat(?st_label, ' (set outside this space)'), ?st_label) as ?status)\n optional {\n { select ?suggestion (max(concat(if(?afm,'1','0'), ?ad, ' ', str(?ag))) as ?apick) where {\n service {\n select (group_concat(?mpk; separator=' ') as ?memberPubkeys) where {\n graph npa:graph { npa:thisRepo npa:hasCurrentSpaceState ?stateG . }\n values ?_resource_multi_iri {}\n graph ?stateG {\n ?_resource_multi_iri npa:isMaintainedBy? ?space .\n ?ri a gen:RoleInstantiation ; npa:forSpace ?space ; npa:forAgent ?agent ; npa:hasRoleType ?rt .\n filter(?rt in (gen:AdminRole, gen:MaintainerRole, gen:MemberRole))\n ?acct a npa:AccountState ; npa:agent ?agent ; npa:pubkey ?mpk .\n }\n }\n }\n graph npa:graph {\n ?anp npa:hasValidSignatureForPublicKeyHash ?apk ; np:hasAssertion ?aa ; dct:created ?adate .\n filter not exists { ?anpi npx:invalidates ?anp ; npa:hasValidSignatureForPublicKeyHash ?apk . }\n }\n graph ?aa { ?suggestion schema:agent ?ag . }\n bind(str(?adate) as ?ad)\n bind(contains(?memberPubkeys, ?apk) as ?afm)\n } group by ?suggestion }\n bind(iri(strafter(?apick, ' ')) as ?assignee)\n }\n # The assignment nanopub that currently wins, so \"assign...\" can seed its form from it.\n # \"use\" fill mode: the form then arrives pre-filled with ALL current assignees,\n # whatever their number. Falls back to the declaring nanopub, because a raw-key\n # (@) mapping with an empty value hides the button entirely.\n optional {\n { select ?suggestion (max(concat(if(?nfm,'1','0'), ?nd, ' ', str(?anp2))) as ?npick) where {\n service {\n select (group_concat(?mpk; separator=' ') as ?memberPubkeys) where {\n graph npa:graph { npa:thisRepo npa:hasCurrentSpaceState ?stateG . }\n values ?_resource_multi_iri {}\n graph ?stateG {\n ?_resource_multi_iri npa:isMaintainedBy? ?space .\n ?ri a gen:RoleInstantiation ; npa:forSpace ?space ; npa:forAgent ?agent ; npa:hasRoleType ?rt .\n filter(?rt in (gen:AdminRole, gen:MaintainerRole, gen:MemberRole))\n ?acct a npa:AccountState ; npa:agent ?agent ; npa:pubkey ?mpk .\n }\n }\n }\n graph npa:graph {\n ?anp2 npa:hasValidSignatureForPublicKeyHash ?npk ; np:hasAssertion ?aa2 ; dct:created ?ndate .\n filter not exists { ?anp2i npx:invalidates ?anp2 ; npa:hasValidSignatureForPublicKeyHash ?npk . }\n }\n graph ?aa2 { ?suggestion schema:agent ?ag2 . }\n bind(str(?ndate) as ?nd)\n bind(contains(?memberPubkeys, ?npk) as ?nfm)\n } group by ?suggestion }\n bind(iri(strafter(?npick, ' ')) as ?assignNp)\n }\n bind(coalesce(?assignNp, ?np) as ?fill_source)\n\n optional {\n { select ?suggestion (count(distinct ?cnp) as ?ccount) where {\n graph npa:graph {\n ?cnp npa:hasValidSignatureForPublicKeyHash ?cpk ; np:hasAssertion ?ca .\n filter not exists { ?cnpi npx:invalidates ?cnp ; npa:hasValidSignatureForPublicKeyHash ?cpk . }\n }\n graph ?ca { ?c a schema:Statement ; rdf:value ?ctext . }\n ?c as:inReplyTo+ ?suggestion .\n } group by ?suggestion }\n filter(?ccount > 0)\n bind(?suggestion as ?comments_multi_iri)\n bind(concat(str(?ccount), if(?ccount = 1, ' comment', ' comments')) as ?comments_label_multi)\n }\n optional { { select ?reporter (min(?rn) as ?reporter_label) where { ?reporter foaf:name ?rn } group by ?reporter } }\n optional { { select ?assignee (min(?an) as ?assignee_label) where { ?assignee foaf:name ?an } group by ?assignee } }\n bind(?suggestion as ?item_multi_iri)\n bind(?title as ?item_label_multi)\n bind(coalesce(lcase(strafter(str(?k), 'RA5BAdUvlxLWMWFQN3UVKoIQEB_MYTiAoLH1klXJ7z-XI/')), '') as ?kind)\n bind(if(?st in (schema:CompletedActionStatus, schema:FailedActionStatus), '2', '1') as ?openRank)\n}\norder by ?openRank desc(?date)\n" } ] } ] }, { "@id": "https://w3id.org/np/RAXLyQFTqT9TBlnkhDR38Hld_M-2WTEGfiZq5BzpWHqQE/pubinfo", "@graph": [ { "@id": "https://orcid.org/0000-0002-1267-0234", "http://xmlns.com/foaf/0.1/name": [ { "@value": "Tobias Kuhn" } ] }, { "@id": "https://w3id.org/np/RAXLyQFTqT9TBlnkhDR38Hld_M-2WTEGfiZq5BzpWHqQE", "http://purl.org/dc/terms/created": [ { "@value": "2026-08-27T07:37:23Z", "@type": "http://www.w3.org/2001/XMLSchema#dateTime" } ], "http://purl.org/dc/terms/creator": [ { "@id": "https://orcid.org/0000-0002-1267-0234" } ], "http://purl.org/dc/terms/license": [ { "@id": "https://creativecommons.org/licenses/by/4.0/" } ], "http://purl.org/nanopub/x/embeds": [ { "@id": "https://w3id.org/np/RAXLyQFTqT9TBlnkhDR38Hld_M-2WTEGfiZq5BzpWHqQE/get-nanosuggestions" } ], "http://purl.org/nanopub/x/supersedes": [ { "@id": "https://w3id.org/np/RATn_fac54wP1UOyThzg-sPQA7N5q2miWhBPHumUJ6VPc" } ], "http://www.w3.org/2000/01/rdf-schema#label": [ { "@value": "Get nanosuggestions for a resource" } ], "https://w3id.org/np/o/ntemplate/wasCreatedFromProvenanceTemplate": [ { "@id": "https://w3id.org/np/RA7lSq6MuK_TIC6JMSHvLtee3lpLoZDOqLJCLXevnrPoU" } ], "https://w3id.org/np/o/ntemplate/wasCreatedFromPubinfoTemplate": [ { "@id": "https://w3id.org/np/RA0J4vUn_dekg-U1kK3AOEt02p9mT2WO03uGxLDec1jLw" }, { "@id": "https://w3id.org/np/RAoTD7udB2KtUuOuAe74tJi1t3VzK0DyWS7rYVAq1GRvw" }, { "@id": "https://w3id.org/np/RAukAcWHRDlkqxk7H2XNSegc1WnHI569INvNr-xdptDGI" } ], "https://w3id.org/np/o/ntemplate/wasCreatedFromTemplate": [ { "@id": "https://w3id.org/np/RAEFAt-QcFK0ZhqfvlsmS10BnzGJA0xwOICZXkO-ai87k" } ] }, { "@id": "https://w3id.org/np/RAXLyQFTqT9TBlnkhDR38Hld_M-2WTEGfiZq5BzpWHqQE/sig", "http://purl.org/nanopub/x/hasAlgorithm": [ { "@value": "RSA" } ], "http://purl.org/nanopub/x/hasPublicKey": [ { "@value": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwUtewGCpT5vIfXYE1bmf/Uqu1ojqnWdYxv+ySO80ul8Gu7m8KoyPAwuvaPj0lvPtHrg000qMmkxzKhYknEjq8v7EerxZNYp5B3/3+5ZpuWOYAs78UnQVjbHSmDdmryr4D4VvvNIiUmd0yxci47dTFUj4DvfHnGd6hVe5+goqdcwIDAQAB" } ], "http://purl.org/nanopub/x/hasSignature": [ { "@value": "HHS/q5eM1twcOrfKoaCY0yOTtB8U83RExzilzS6NcZ94kNX7JKDs0//jFAzoexdrelxfmIYHsJtAy8Ahau3JsncEzzk31MrCLy8AGL6KBXFu51Q9dVqG5+qD1z5fFu1U6vVowwfCMMGFs9LVZB8t0RoN1QGdB1DqCWMF1xe9mrg=" } ], "http://purl.org/nanopub/x/hasSignatureTarget": [ { "@id": "https://w3id.org/np/RAXLyQFTqT9TBlnkhDR38Hld_M-2WTEGfiZq5BzpWHqQE" } ], "http://purl.org/nanopub/x/signedBy": [ { "@id": "https://orcid.org/0000-0002-1267-0234" } ] } ] }, { "@id": "https://w3id.org/np/RAXLyQFTqT9TBlnkhDR38Hld_M-2WTEGfiZq5BzpWHqQE/Head", "@graph": [ { "@id": "https://w3id.org/np/RAXLyQFTqT9TBlnkhDR38Hld_M-2WTEGfiZq5BzpWHqQE", "http://www.nanopub.org/nschema#hasAssertion": [ { "@id": "https://w3id.org/np/RAXLyQFTqT9TBlnkhDR38Hld_M-2WTEGfiZq5BzpWHqQE/assertion" } ], "http://www.nanopub.org/nschema#hasProvenance": [ { "@id": "https://w3id.org/np/RAXLyQFTqT9TBlnkhDR38Hld_M-2WTEGfiZq5BzpWHqQE/provenance" } ], "http://www.nanopub.org/nschema#hasPublicationInfo": [ { "@id": "https://w3id.org/np/RAXLyQFTqT9TBlnkhDR38Hld_M-2WTEGfiZq5BzpWHqQE/pubinfo" } ], "@type": [ "http://www.nanopub.org/nschema#Nanopublication" ] } ] } ]