1

I'm trying to get only issues with relations with another issue in redmine REST API.

I can't find any reference over internet for doing so

https://redmine.xxxx.com/issues.json?include=relations

another possibility would be getting all issues, but sorted by "relations" in order to get first all issues with relations

tried either

https://redmine.xxxx.com/issues.json?include=relations&sort=relations
https://redmine.xxxx.com/issues.json?include=relations&sort=relations:desc

without luck. any idea ?

edit adding use case scenario to help understanding the current situation. this specific redmine instance is used for Master Data Management scenario. Issues are entities / schemas / tables / columns and we are using relations for mapping.

our current "proof of concept" system has ~11000 issues and I would like to vizualize (search, navigate, zoom) only the one with relationships. This prevents me to call for each issues the relations API.

enter image description here

camous
  • 998
  • 11
  • 27

1 Answers1

-1

Let's assume your "another issue" has the ID 123. To get all issues with a relation to this issue, just get the issue's content with include=relations, i.e.

https://redmine.example.com/issues/123.json?include=relations

in the returned data, you will receive a JSON object with the IDs of all related issues. You can then get these in subsequent API calls.

If you are only interested in the relations, you can also use the issue relations API directly with

https://redmine.example.com/issues/123/relations.json
Holger Just
  • 52,918
  • 14
  • 115
  • 123
  • definitively a working solution but not matching my use case and the number of issues I have to query. I've edited my initial question to bring context. – camous May 18 '16 at 08:34
  • 1
    In that case, I'm sorry, but you are doing it wrong :) Redmine is not a generic data modelling tool and its API is not suited for this. You should use an actual database system for this, e.g. a SQL database (MySQL, PostgreSQL) or a document store like CouchDB, Reddis or even MongoDB. – Holger Just May 18 '16 at 10:44
  • :) I'm not really using redmine for modelling but for getting an up to date vision of our IT data (we are several teams with tons of nice non updated excel mapping files) including lifecycle (using status) and including discussion (issue notes) with entity owner (assignee/watcher). I know other dedicated tool exists for that purpose (talend, etc) but we have IT and experience in redmine, and it's "free" :) – camous May 18 '16 at 12:07