Re: having a detector add a message to an issue
Dan Tenenbaum <[email protected]>
| Newsgroups | gmane.comp.bug-tracking.roundup.user |
|---|---|
| Message-ID | <[email protected]> |
----- Original Message ----- > From: "John P. Rouillard" <[email protected]> > To: "Dan Tenenbaum" <[email protected]> > Cc: "roundup-users" <[email protected]> > Sent: Thursday, May 14, 2015 7:08:15 PM > Subject: Re: [Roundup-users] having a detector add a message to an issue > > In message > <[email protected]>, > Dan Tenenbaum writes: > >----- Original Message ----- > >> From: "Ralf Schlatterbeck" <[email protected]> > >> To: "roundup-users" <[email protected]> > >> Sent: Thursday, May 14, 2015 2:48:32 AM > >> Subject: Re: [Roundup-users] having a detector add a message to an > >> issue > >> > >> On Thu, May 14, 2015 at 12:29:48PM +1000, John Kristensen wrote: > >> > > >> ... > >> > msg_id = db.msg.create( > >> > author=db.getuid(), > >> > date=Date('.'), > >> > summary='some message summary', > >> > content='content of message', > >> > files=[file_id] > >> > ) > >> > > >> > newvalues['messages'] = [msg_id] > >> > >> If you don't notice that from the code: The "content" property of > >> a > >> msg (same for file) is transparently stored in a file in the > >> filesytem, > >> but the API treats it like any other property. > >> > >> You probably don't want to set newvalues['messages'] to just the > >> new > >> msg_id if you already have some messages attached to the issue... > > > >Both of your suggestions were very helpful. I got it working! > >Thanks, > > For future reference, what did you end up using? I added this to my detector: if not 'messages' in newvalues: msg_id = db.msg.create( author=db.getuid(), date=Date('.'), summary='', content='' ) newvalues['messages'] = [msg_id] After that, I can append to the message file just as I was doing before. Dan > > -- > -- rouilj > John Rouillard > =========================================================================== > My employers don't acknowledge my existence much less my opinions. > ------------------------------------------------------------------------------ One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y