issue generation based on RFP in redmine plugin

Added by anish shah about 9 years ago

i have been creating RFP plugin in redmine ,in this plug in contains a form which will filled by user .The form fields contains client requirement when user fill &submmited it the issues must generate in respective project.All form fields on form must become the issues
my question is how each fiels on form i map with the redmine issue table and generate the respective issue

Replies (1)

RE: issue generation based on RFP in redmine plugin - Added by anish shah about 9 years ago

i have been creating RFP plugin in redmine ,in this plug in contains a form which will filled by user .The form fields contains client requirement when user fill &submmited it the issues must generate in respective project.All form fields on form must become the issues my question is how each fiels i map with the redmine issue table and generate the respective issue

def new
@rfp = Rfp.new
respond_to do |format|
format.html # new.html.erb
end
end
def create
params[:rfp].delete(:project_id)
@rfp = Rfp.new(params[:rfp])
issue = Issue.new
issue.subject = params[:rfp]
issue.tracker = Tracker.find_by_name("Feature")
issue.project = Project.find_by_name(params[:project])
issue.start_date = Time.now.localtime.strftime("%Y-%m-%d")
issue.priority = IssuePriority.find_by_name("Normal")
issue.author = User.find_by_mail("")
issue.status = IssueStatus.find_by_name("New")
issue.save
respond_to do |format|
if @rfp.save
format.html { redirect_to :action => "show", :id => @rfp }
else
format.html { render "new" }
end
end
end

Here rfp is in th plugin object when i submitted the form it is successfully created but at the same time i want to create a new issue in redmine based on the value submmited in the form thats not happen any help

(1-1/1)