0

I have two servers with redmine. One of them should be able to fetch information from the other one. I use REST API for it, but I can't get all information with it. I use it like this:

addr = "https://www.redmine.com/issues/" + params[:my_id] + ".json"
@log = "OK"

begin
  res = RestClient.get addr, :accept => :json, :params => { :key => key }, :timeout => 5, :open_timeout => 5
rescue => e
  @log = "error"
end

It is working fine, but I don't get all the information. In one plugin I am using, there is migration of database, which add some columns to the issues table. There is following line for example:

add_column :issues, :country, :string

so I have information about country for all issues.

But using my previous request, I don't receive information about country.

I also tried to modify my request according http://www.redmine.org/projects/redmine/wiki/Rest_api. It means that it looks like this:

addr = "https://www.redmine.com/issues/" + params[:my_id] + ".json?include=country"

but it returns error.

Do I have to enable this feature somehow? Is there some better approach to fetch all the information? Do I have to modify that previous plugin somehow?

1 Answers1

0

Because you edited database directly, you need to edit redmine/app/views/issues/show.api.rsb and add missing field like api.country @issue.country

Noma4i
  • 751
  • 7
  • 19