Feature #9076

Allow to prefill issue form via http url parameter

Added by Terence Mill about 6 years ago. Updated 12 months ago.

Status:ClosedStart date:2011-08-17
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Issues
Target version:-
Resolution:

Description

It would be usefully to be able to set all issue form filed via http get parameter.

e.g http://www.redmine.org/issues/new?id=&project_id=redmine&tracker=2&category_id=1

Associated revisions

Revision 9174
Added by Jean-Philippe Lang over 5 years ago

Adds a test for #9076.

History

#1 Updated by Ján Regeš over 5 years ago

Hi, +1 for this feature.

For us, it's really important - we need it for creating a "smart quick links" for our clients.

Thank you.

#2 Updated by Terence Mill over 5 years ago

+1

#3 Updated by Jean-Philippe Lang over 5 years ago

  • Status changed from New to Closed

#4 Updated by Terence Mill over 5 years ago

  • Status changed from Closed to Reopened

We need to prefill description and custom fields of type list, version, text and user. Can't find and example in wiki.

#5 Updated by Jean-Philippe Lang over 5 years ago

  • Status changed from Reopened to Closed

Here is an example with prefilled description and custom field:
http://www.redmine.org/projects/redmine/issues/new?issue[description]=prefilled%20description&issue[custom_field_values][2]=Duplicate

For user and version custom fields, you have to provide the user id or version id, eg: issue[custom_field_values][5]=26 where 5 is the custom field id and 26 is the user/version id.

#6 Updated by Darren Pearce 12 months ago

I'm trying to use this feature so that I can supply links in an email that users can click on, thus optimising their flow for creating an issue. A URL such as this:

.../issues/new?issue[tracker_id]=7&issue[subject]=Example%20Subject&issue[custom_field_values][3]=1.2.4&issue[custom_field_values][6][]=Android&issue[custom_field_values][6][]=iOS&issue[priority_id]=5

works fine with the syntax of issue[custom_field_values][6][] working to specify multiple values for a custom field (the syntax was an educated guess).

However, when I try to specify the assignee with issue[assignee_id] such as:

.../issues/new?issue[tracker_id]=7&issue[subject]=Example%20Subject&issue[custom_field_values][3]=1.2.4&issue[custom_field_values][6][]=Android&issue[custom_field_values][6][]=iOS&issue[priority_id]=5&issue[assignee_id]=2

or (in desperation):
.../issues/new?issue[tracker_id]=7&issue[subject]=Example%20Subject&issue[custom_field_values][3]=1.2.4&issue[custom_field_values][6][]=Android&issue[custom_field_values][6][]=iOS&issue[priority_id]=5&issue[user_id]=1

where 1 is a valid user id, it doesn't work. Am I missing something?

We are on a rather old version of Redmine (Redmine 2.4.2.stable) so can you advise if this was fixed in later versions or if I am doing something wrong?

#7 Updated by Jean-Philippe Lang 12 months ago

Use issue[assigned_to_id] instead of issue[assignee_id]. Please don't post here in closed tickets.

Also available in: Atom PDF