Project

General

Profile

Creating an issue fails for SpiraTest syncing to Redmine.

Added by Derek Li almost 10 years ago

Dear Madam/Sir,

I'm using the SpiraTest with Redmine. It's a free plugin offering from SpiraTest. If I create issues in Redmine, incidents are created in SpiraTest automatically after sync. executed. It's OK. However If I create incidents in SpiraTest, issues cannot be created in Redmine. Error logs are as below. Could you help us on this issue? Thank you.

==================================================== Output for about command ==============================================================================
root@redmine:/opt/bitnami/apps/redmine/htdocs/script# RAILS_ENV=production ./about

sh: 1: darcs: not found
sh: 1: hg: not found
sh: 1: cvs: not found
sh: 1: bzr: not found
Environment:
Redmine version 2.4.1.stable
Ruby version 1.9.3-p484 (2013-11-22) [x86_64-linux]
Rails version 3.2.16
Environment production
Database adapter Mysql2
SCM:
Subversion 1.8.4
Git 1.8.3
Filesystem
Redmine plugins:
no plugin installed

=============================================== The error message appeared in production.log ============================================================
Started POST "/redmine/issues.xml" for 10.10.101.101 at 2014-09-26 06:14:23 +0000
Processing by IssuesController#create as XML
Parameters: {"issue"=>{"subject"=>"CTester: 2 created on 9/26", "notes"=>nil, "description"=>" This is defect created in SpiraTest. ", "project_id"=>"107", "priority_id"=>"2", "status_id"=>"1", "tracker_id"=>"1", "custom_fields"=>nil}}
Current user: anonymous
Filter chain halted as :authorize rendered or redirected
Completed 401 Unauthorized in 7.8ms (ActiveRecord: 1.4ms)
Started POST "/redmine/issues.xml" for 10.10.101.101 at 2014-09-26 06:14:23 +0000
Processing by IssuesController#create as XML
Parameters: {"issue"=>{"subject"=>"CTester: 2 created on 9/26", "notes"=>nil, "description"=>" This is defect created in SpiraTest. ", "project_id"=>"107", "priority_id"=>"2", "status_id"=>"1", "tracker_id"=>"1", "custom_fields"=>nil}}
Current user: admin (id=5)
Completed 500 Internal Server Error in 60.1ms

NoMethodError (undefined method `inject' for nil:NilClass):
lib/plugins/acts_as_customizable/lib/acts_as_customizable.rb:55:in `custom_fields='
app/models/issue.rb:347:in `assign_attributes_with_project_and_tracker_first'
app/models/issue.rb:470:in `safe_attributes='
app/controllers/issues_controller.rb:426:in `build_new_issue_from_params'

Started GET "/redmine/issues.xml?project_id=107&created_on=%3E=1990-01-01&offset=0&limit=100" for 10.10.101.101 at 2014-09-26 06:14:23 +0000
Processing by IssuesController#index as XML
Parameters: {"project_id"=>"107", "created_on"=>">=1990-01-01", "offset"=>"0", "limit"=>"100"}
Current user: anonymous
Filter chain halted as :find_optional_project rendered or redirected
Completed 401 Unauthorized in 8.7ms (ActiveRecord: 1.6ms)
Started GET "/redmine/issues.xml?project_id=107&created_on=%3E=1990-01-01&offset=0&limit=100" for 10.10.101.101 at 2014-09-26 06:14:23 +0000
Processing by IssuesController#index as XML
Parameters: {"project_id"=>"107", "created_on"=>">=1990-01-01", "offset"=>"0", "limit"=>"100"}
Current user: admin (id=5)
Rendered issues/index.api.rsb (18.0ms)
Completed 200 OK in 70.4ms (Views: 17.6ms | ActiveRecord: 13.9ms)
Started GET "/redmine/issues.xml?project_id=107&created_on=%3E=1990-01-01&offset=100&limit=100" for 10.10.101.101 at 2014-09-26 06:14:24 +0000
Processing by IssuesController#index as XML
Parameters: {"project_id"=>"107", "created_on"=>">=1990-01-01", "offset"=>"100", "limit"=>"100"}
Current user: anonymous
Filter chain halted as :find_optional_project rendered or redirected
Completed 401 Unauthorized in 10.1ms (ActiveRecord: 1.7ms)

========================================================= Errors in Event Viewer on SpiraTest server ============================================================
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
- <System>
<Provider Name="SpiraTest Data Sync Service" />
<EventID Qualifiers="0">0</EventID>
<Level>2</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2014-09-26T06:14:23.000000000Z" />
<EventRecordID>109790</EventRecordID>
<Channel>Application</Channel>
<Computer>test1-PC</Computer>
<Security />
</System>
- <EventData>
<Data>Error Adding SpiraTest Incident to Redmine: Internal Server Error at Redmine.Net.Api.RedmineManager.HandleWebException(WebException exception, String method) at Redmine.Net.Api.RedmineManager.ExecuteUpload[T](String address, String actionType, String data, String methodName) at Redmine.Net.Api.RedmineManager.CreateObject[T](T obj, String ownerId) at Inflectra.SpiraTest.AddOns.RedmineDataSync.DataSync.ProcessIncident(Int32 projectId, ImportExportClient spiraImportExport, RedmineManager redmineManager, RemoteIncident remoteIncident, List`1 newIncidentMappings, List`1 newReleaseMappings, List`1 oldReleaseMappings, Dictionary`2 customPropertyMappingList, Dictionary`2 customPropertyValueMappingList, RemoteCustomProperty[] incidentCustomProperties, RemoteDataMapping[] incidentMappings, Int32 externalProjectId, String productName, RemoteDataMapping[] severityMappings, RemoteDataMapping[] priorityMappings, RemoteDataMapping[] statusMappings, RemoteDataMapping[] typeMappings, RemoteDataMapping[] userMappings, RemoteDataMapping[] releaseMappings) at Inflectra.SpiraTest.AddOns.RedmineDataSync.DataSync.Execute(Nullable`1 lastSyncDate, DateTime serverDateTime)</Data>
</EventData>
</Event>

- <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
- <System>
<Provider Name="SpiraTest Data Sync Service" />
<EventID Qualifiers="0">0</EventID>
<Level>2</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2014-09-26T06:14:23.000000000Z" />
<EventRecordID>109789</EventRecordID>
<Channel>Application</Channel>
<Computer>test1-PC</Computer>
<Security />
</System>
- <EventData>
<Data>RedmineManager: address=http://10.10.112.14/redmine/issues.xml, methodName=CreateObject<Issue>, data=<issue><subject>CTester: 2 created on 9/26</subject><notes /><description> This is defect created in SpiraTest. </description><project_id>107</project_id><priority_id>2</priority_id><status_id>1</status_id><tracker_id>1</tracker_id><custom_fields type="array" /></issue></Data>
</EventData>
</Event>

Best regards,

Derek Li


Replies (1)

RE: Creating an issue fails for SpiraTest syncing to Redmine. - Added by Martin Denizet (redmine.org team member) almost 10 years ago

Hello Derek,
The error you have seem quite clear:

Current user: anonymous
Filter chain halted as :authorize rendered or redirected
Completed 401 Unauthorized in 7.8ms (ActiveRecord: 1.4ms)

You try to use the API without authentication.
I suggest you to turn to the authors of the plugin for documentation and support.

Cheers,

    (1-1/1)