federatedbookkeeping / task-tracking

This repo contains the artefacts tracking work done on the Federated Task-Tracking project, funded by NLnet and the NGI Assure Programme.
MIT License
5 stars 2 forks source link

Duplicates created each time lri-mapping.json is lost #27

Closed michielbdejong closed 5 months ago

michielbdejong commented 5 months ago

The system works now GitHub->Jira if there is a single process in charge, but it would be nice if it could be more idempotent, and run in multiple instances (or after deleting lri-mapping.json) without creating duplicates.

I'll see if we can store custom data on each side or at least on one side, to act as a shared version of lri-mapping.json.

michielbdejong commented 5 months ago

I think I was able to add github-node-id as a custom field in https://fedtt.atlassian.net/jira/software/projects/KAN/settings/issuetypes/10001

michielbdejong commented 5 months ago

I can query the current fields:

curl --request GET   --url 'https://fedtt.atlassian.net/rest/api/3/field'   --user "michiel@unhosted.org:$ATLASSIAN"   --header 'Accept: application/json' | python -m json.tool > fields.json
michielbdejong commented 5 months ago

It seems to be my field is "github-node-id" in the GUI but "customfield_10033" in the API

michielbdejong commented 5 months ago

OK, that worked, so now https://fedtt.atlassian.net/browse/KAN-280 is correctly linked to

query {
  node(id:"I_kwDOKXQJLM580iCe") {
    ... on Issue {
      url
    }
  }
}

on https://docs.github.com/en/graphql/overview/explorer which leads us to https://github.com/solid-contrib/data-modules/issues/77

Next step: query atlassian for a batch of github-node-id values, and create only the missing ones

michielbdejong commented 5 months ago

here is a JQL search that works in the browser: https://fedtt.atlassian.net/rest/api/3/search?jql=id%3D10279