[Trac] Re: Default values for new ticket throgh url

2008-10-20 Thread Daan van Etten

Sure!

Try something like:

http://example.com/newticket?description=descriptionsummary=summary
To have the description and summary automatically filled.

The majority of the fields can be filled that way. Try component,  
milestone, version, etcetera.

Regards,

Daan

On 20 okt 2008, at 09:02, Jani Tiainen wrote:


 Is it possible to feed default values to ticket through url?

 I've few projects that has multiple customers and instead of always
 doing many cliks to get correct values I would like to have URL
 shortcusts (or similiars) to automatically fill some fields for me. Is
 this possible?


 -- 
 Jani Tiainen

 Tein sein mihin näillä lahjoilla pystyin.
  Tein sen, en yhtään enempää. - Martti Servo  Napander


 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Trac 
Users group.
To post to this group, send email to trac-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en
-~--~~~~--~~--~--~---



[Trac] Re: Default values for new ticket throgh url

2008-10-20 Thread Sachin Arora
Yes. You can do a get request on the URL for new ticket and add the
parameters

This is how I have done it.

http://
yourtrackserver/newticket?keywords=abcsummary=testversion=1.0owner=foodescription=foo+bar

A couple of points to note -

1) If the value you are passing to a particular ticket parameter in the URL
contains space, you can use + as the separator. If the values contain other
characters like quotes, @ etc. you should do a URL encoding of the values.

2) The name of the parameter you pass into the URL is a bit different from
the name of the corresponding INPUT element in the New ticket HTML form.
However, you can derive the parameter name by stripping field_ from the html
element name e.g. the html element for keywords field is named
'field_keywords', the corresponding URL parameter is 'keywords'(as you'd see
in the above sample URL format)

3) If the size of the URL gets large, you might need into the limit on the
GET request posted by most web servers. But it should be atleast 1024 bytes,
and based on your use case below, I guess you won't run into that problem.


Thanks,
Sachin

On Mon, Oct 20, 2008 at 12:32 PM, Jani Tiainen [EMAIL PROTECTED] wrote:


 Is it possible to feed default values to ticket through url?

 I've few projects that has multiple customers and instead of always
 doing many cliks to get correct values I would like to have URL
 shortcusts (or similiars) to automatically fill some fields for me. Is
 this possible?


 --
 Jani Tiainen

 Tein sein mihin näillä lahjoilla pystyin.
  Tein sen, en yhtään enempää. - Martti Servo  Napander


 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Trac 
Users group.
To post to this group, send email to trac-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en
-~--~~~~--~~--~--~---