I'm using redmine-java-api 3.1.3 in an older project and tried to implement a minor change today, making it list only open (=non-closed) redmine projects instead of all projects.
There seems to be no documentation on this, but I found the property storage that I can retrieve via project.getStorage()
. However, I was unable to list existing properties (getProperties()
does not seem to exist in this version), so I do not even know if I'm on the correct path.
RedmineManager redmineManager = TymyController.getRedmineManager();
ProjectManager projectManager = redmineManager.getProjectManager();
try {
List<Project> projects;
projects = projectManager.getProjects();
for (Project project : projects) {
PropertyStorage storage = project.getStorage();
/* my temporary output: */
Logger.getLogger(TymyController.class.getName()).log(Level.SEVERE, storage.get(NO_IDEA_WHAT_TO_WRITE_HERE));
Any insight on how to list only open projects or available property storage keys would be helpful.
redmine-java-api is a wrapper around Redmine REST API. it can use (or at least it can be extended to use ) whatever project APIs are available here https://www.redmine.org/projects/redmine/wiki/Rest_Projects
feel free to submit a patch for Redmine to support filters when requesting projects list. once that is implemented (in Redmine), you can also add that filter to redmine-java-api library.
also, take a look at javadoc of "getStatus" and "setStatus" method in Project class https://github.com/taskadapter/redmine-java-api/blob/master/src/main/java/com/taskadapter/redmineapi/bean/Project.java#L210