Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG  Not logged in ELOG logo
icon5.gif   how to retrieve attachment on execute new, posted by Zbigniew Reszela on Tue Dec 14 10:37:41 2010 
    icon2.gif   Re: how to retrieve attachment on execute new, posted by Zbigniew Reszela on Tue Dec 14 18:43:38 2010 
       icon2.gif   Re: how to retrieve attachment on execute new, posted by Stefan Ritt on Wed Dec 15 08:49:30 2010 
          icon2.gif   Re: how to retrieve attachment on execute new, posted by Zbigniew Reszela on Thu Dec 16 19:20:20 2010 
             icon2.gif   Re: how to retrieve attachment on execute new, posted by Stefan Ritt on Thu Dec 23 10:42:05 2010 
Message ID: 66978     Entry time: Thu Dec 16 19:20:20 2010     In reply to: 66976     Reply to this: 66979
Icon: Reply  Author: Zbigniew Reszela  Author Email: zreszela@cells.es 
Category: Question  OS: Linux  ELOG Version: 2.8 
Subject: Re: how to retrieve attachment on execute new 

Stefan Ritt wrote:

Zbigniew Reszela wrote:

Zbigniew Reszela wrote:

Hello all,

I have a problem with retrieving attachments of an entry on "Execute new" command. In the syntax of elodg.cfg it is: In addition the list of all attachments can be referred to via $<attachment>. Could anyone explain it a little bit more explicit, or attach an example?

Thank you in advance.

 

Hello again,

I have managed with problem by using $attachments. This provides me a list o paths to attachments. If it's the correct way to use it please change elogd.cfg syntax page.

Thanks a lot.

Yes, indeed there was a typo in the documentation, $attachments is the correct one. I changed that in the syntax page.

Hello Stefan,

first of all thanks for quick response.

However I encountered another problem, but to explain it well I need to tell you more what actually I want to do with these substitutions. 

So I would like to have a python script which on add new entry will create a new entry in another logbook with the same data (Only for certain attributes' values). That's why I need attachments.

These substitutions will be used as command line arguments of the script.

Since I started using $attachments, all the substitutions used before it, are passed twice? Without using $attachments substitution, it works fine - they are passed only once.

Furthermore I tested it without script, just passing them to a text file, and it seems that it really doesn't work well. Could you check that?

-------------------

Execute new = echo $message id '$long_name' '$System' '$Equipment' '$Subject' '$text' > /tmp/zzz_elog.log             WORKS GOOD

Execute new = echo $message id '$long_name' '$System' '$Equipment' '$Subject' '$text'  $attachments> /tmp/zzz_elog.log            DOESN'T WORK GOOD

------------------

Thank you a lot in advance.

 

ELOG V3.1.5-fe60aaf