ID |
Date |
Icon |
Author |
Author Email |
Category |
OS |
ELOG Version |
Subject |
67411
|
Wed Jan 2 15:38:19 2013 |
| Barend | office@amtc2.com | Question | Windows | 2.9 | Re-using IDs after move to another Logbook overwrite Entries | Hi Stefan,
I have observed following behavior when I move entries from one logbook to another:
- The first entry in "Open" get ID "1"
- When I move this Item to "Closed", it will keep ID "1" as I have used "Preserve IDs = 1"
- A new entry in "Open" gets ID "1" again
- When I move this item to "Closed" it will overwrite the previous ID "1" in "Closed"
- A new entry in "open" gets ID "1" again....
Every new entry in "Open" will get the next higher ID Number related to the highest available ID number/entry in "Open".
Upon "move to Closed", the previous entries in "Closed"will be overwritten.
Is there a way to prevent the usage of a previously used ID Number when entering a new ID?
I.e. If an entry with ID "1" has been used in "Open" and moved to "Closed", have the next entry in "Open" use ID "2"?
Kind regards,
Barend |
67428
|
Thu Jan 24 10:42:13 2013 |
| Barend | office@amtc2.com | Question | Windows | 2.9 | Re: Re-using IDs after move to another Logbook overwrite Entries |
Stefan Ritt wrote: |
David Pilgram wrote: |
Barend wrote: |
Hi Stefan,
I have observed following behavior when I move entries from one logbook to another:
- The first entry in "Open" get ID "1"
- When I move this Item to "Closed", it will keep ID "1" as I have used "Preserve IDs = 1"
- A new entry in "Open" gets ID "1" again
- When I move this item to "Closed" it will overwrite the previous ID "1" in "Closed"
- A new entry in "open" gets ID "1" again....
Every new entry in "Open" will get the next higher ID Number related to the highest available ID number/entry in "Open".
Upon "move to Closed", the previous entries in "Closed"will be overwritten.
Is there a way to prevent the usage of a previously used ID Number when entering a new ID?
I.e. If an entry with ID "1" has been used in "Open" and moved to "Closed", have the next entry in "Open" use ID "2"?
Kind regards,
Barend
|
Hi Barend,
The counting of entries, or even "tickets", only works within a particular logbook. If you archive a set of entries to another [archive] logbook, the archived set disappears from view of the original logbook. Should that entry, from logbook to archive, be the *latest* thread, then there is the danger of over-writing message ID, Ticket No and the like.
My policy to prevent the problem is to archive only threads that are say (depending upon use) a month after last entry..
|
I generally consider using the ID as ticket number a bad idea. The ID is the "primary key" (in terms of database language), and must be unique inside a logbook. So when moving entries between logbooks, there will be always problems.
Why don't you define an attribute "Ticket ID" and use that one? That won't change when you move the entry between logbooks:
Attributes = Ticket ID, Subject, ...
Preset Ticket ID = ID-#####
|
Hi All,
I have tried to use the "Ticket ID" approach and with each new entry this Ticket ID is indeed increased automatically...
But when the last Entry (with the highest Ticket ID i.e. ID-0009) is move to another Logbook, the Ticket ID in the next new entry will be "ID-0009" again (based upon the last previous entry "ID-0008").
So this appraoch will also re-produce duplicate Ticket IDs.
Is it possible to have the Ticket ID preset with value based upon the Date & Time of the entry? Instead of holding a Date/Time format, use a calculated numeric format?
This way, each new entry will have a truely unique Ticket ID.
Thanks & Regards, Barend |
67571
|
Tue Oct 8 18:14:20 2013 |
| Barend | office@amtc2.com | Bug report | Windows | 2.9.2 | Importing XML/CSV | Hi Stefan,
I'm experiencing problems importing XML (.csv is not working at all for me).
My logbook contains 3 date-attributes besides the system DATE (entry time), date-format is defined as %d %b %y.
The XML file hold the date format "DD.MM.YYYY"
- During "preview" I see that all entries are listed.
- During the import I get the "wrong date format" error.
- When I review the Summary, I see that only the first XML entry (all 3 date-attributes hold a date) was imported.
- When I try to re-import the XML from the second entry (after removing the 1st entry from XML - this second entry hold NO date-value on one of the date-attributes) the elogd.exe crashes and I get the "Service Temporarily Unavailable" error page.
- When I try to re-import the XML from the modified second entry (after removing the 1st entry from XML - this second entry holds date-value on all of the date-attributes) the elogd.exe crashes and I get the "Service Temporarily Unavailable" error page.
Any suggestion what could be wrong? Is it the missing date-value? |
Attachment 1: import.xml
|
<?xml version="1.0" encoding="ISO-8859-1"?>
<ELOG_LIST>
<ENTRY>
<MID>1</MID>
<DATE>Mon 07 Oct 2013 11:41:42 +0200</DATE>
<ENCODING>plain</ENCODING>
<Data_dekretacji>01.10.2013</Data_dekretacji>
<Numer_rejestru>XXX/2013/001</Numer_rejestru>
<Numer_umowy>44/333/N/2012</Numer_umowy>
<Nazwa_dokumentu>XXXXXXXXXXXXXXXX</Nazwa_dokumentu>
<Przedmiot_umowy></Przedmiot_umowy>
<Kontrahent>AAAAAAAA BBBBBBBBBB</Kontrahent>
<Data_zawarcia>10.07.2012</Data_zawarcia>
<Data_konca>10.07.2013</Data_konca>
<Dzial></Dzial>
<Status>Nieaktualna</Status>
<Aneksy></Aneksy>
<Opis></Opis>
<Opis2></Opis2>
<Opis3></Opis3>
</ENTRY>
<ENTRY>
<MID>2</MID>
<DATE>Mon 07 Oct 2013 11:41:42 +0200</DATE>
<ENCODING>plain</ENCODING>
<Data_dekretacji>01.10.2013</Data_dekretacji>
<Numer_rejestru>XXX/2013/002</Numer_rejestru>
<Numer_umowy>33/330/N/2012</Numer_umowy>
<Nazwa_dokumentu>CCCCCC DDDDDDDD</Nazwa_dokumentu>
<Przedmiot_umowy></Przedmiot_umowy>
<Kontrahent>XXXXXXXXXXXXXX</Kontrahent>
<Data_zawarcia>01.06.2012</Data_zawarcia>
<Data_konca></Data_konca>
<Dzial></Dzial>
<Status>Aktualna</Status>
<Aneksy></Aneksy>
<Opis></Opis>
<Opis2></Opis2>
<Opis3></Opis3>
</ENTRY>
</ELOG_LIST>
|
67582
|
Sun Oct 13 16:32:05 2013 |
| Barend | office@amtc2.com | Bug report | Windows | 2.9.2 | Re: Importing XML/CSV |
Andreas Luedeke wrote: |
Barend wrote: |
Hi Stefan,
I'm experiencing problems importing XML (.csv is not working at all for me).
My logbook contains 3 date-attributes besides the system DATE (entry time), date-format is defined as %d %b %y.
The XML file hold the date format "DD.MM.YYYY"
- During "preview" I see that all entries are listed.
- During the import I get the "wrong date format" error.
- When I review the Summary, I see that only the first XML entry (all 3 date-attributes hold a date) was imported.
- When I try to re-import the XML from the second entry (after removing the 1st entry from XML - this second entry hold NO date-value on one of the date-attributes) the elogd.exe crashes and I get the "Service Temporarily Unavailable" error page.
- When I try to re-import the XML from the modified second entry (after removing the 1st entry from XML - this second entry holds date-value on all of the date-attributes) the elogd.exe crashes and I get the "Service Temporarily Unavailable" error page.
Any suggestion what could be wrong? Is it the missing date-value?
|
Can you post your elog configuration file (elog.cfg)?
⇄
Detect language » English
|
Hi Andreas,
I had to filter-out some other logbook. Please find attached the configuration section for the affected logbook "UMOWY".
Looking forward to your review.
Regards, Barend |
Attachment 1: umowy.cfg
|
[UMOWY]
Time format = %d %b %y - %H:%M
Date format = %d %b %y
Display mode = summary
Comment = Umowy
Menu commands = List, New, Edit, Reply, Delete, Duplicate, Find, Config, Logout, Help, Import
List Menu commands = List, New, Select, Find, Config, Logout, Help, Import
Attributes = Data dekretacji, Numer rejestru, Numer umowy, Nazwa dokumentu, Przedmiot umowy, Kontrahent, Data zawarcia, Data konca, Dzial, Status, Aneksy, Opis
List display = Data dekretacji, Numer rejestru, Numer umowy, Nazwa dokumentu, Przedmiot umowy, Kontrahent, Data zawarcia, Data konca, Dzial, Status, Aneksy, Opis
Style STATUS Nieaktualna = background-color:#FFC0CB
Style STATUS Aktualna = background-color:lightgreen
Preserve IDs = 0
Preset Numer rejestru = XXX/%Y/###
Quick filter = Numer rejestru, Numer umowy
Extendable options = Author, Carrier
Options Status = Aktualna, Nieaktualna
Options Aneksy = boolean
Options Okres obowiazywania = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
Options Dzial = DA, DOP, DP, DTL, DTL BZG, DTL GDN, DTL KTW, DTL POZ, DTL WAW, DTL WRO, L&F
Options Przedmiot umowy = Obsluga, Najem, Media, Leasing
Format Numer rejestru = 0, attribname, attribvalue, 10, 10
Format Numer umowy = 0, attribname, attribvalue, 10, 20
Format Opis = 0, attribname, attribvalue, 1000, 1000
Comment Aneksy = Jezeli sa to zaznacz: X
Type Date of change = datetime
Type Data zawarcia = date
Type Data konca = date
Type Data dekretacji = date
Thread display = $Carrier $Name of Doc $Version No $Date of change entered by $author on $Entry time
Page Title = Umowy Logbook - $Subject
Preset Author = $long_name
Locked Attributes = Author
Restrict edit = 0
Subst on reply subject = Re: $Subject
Suppress Email to users = 1
Theme = digilog
CSS = digilog.css
Title image = <img style="width:91;height:21;border:0" src="digilog.png" alt="eLOG" title="eLOG">
Top text = <img src="aerocol-transparent.png" style="height:46;width:146;border=0" alt="AeroSoft Systems Inc." title="AeroSoft Systems Inc."> <span class="asiTitle">DigiLOG™ Electronic Event Log</span>
Allowed encoding = 1
Suppress default = 3
Suppress Email on edit = 3
Fonts = Verdana, Geneva, Arial, Helvetica, sans-serif
Show attachments = 0
Preview attachments = 0
Append on reply = \n\nAdded $date by $long_name\n\n
Preset on reply Author = $long_name
Preset on reply Number= $Number
Subst on edit Author = $long_name
Fixed Attributes Edit = Author
Allow Delete = admin
Show text = 1
Sort Attributes = Carrier, Name of Doc, Version No
Message comment = Tu prosze umieszczac informacje o ANEKSACH oraz informacje dodatkowe:
Reply comment = Please enter your reply here:
Attachment comment = Tu prosze dodac zalaczniki:
Use Lock = 0
Fix text = 0
Logout to main = 1
Resubmit default = 2
Expand default = 1
Reverse sort = 1
Suppress default = 3
Suppress execute default = 2
Suppress Email on edit = 3
|
67583
|
Mon Oct 14 12:08:16 2013 |
| Barend | office@amtc2.com | Question | Windows | 2.9.2 | Error: Attribute <date> not supplied. | Stefan/Andreas,
When I reply to an existing Logbook entry, I get the error page "Error: Attribute Audit Date not supplied. Please go back and enter the Audit Date field."
The configuration file uses:
Required Attributes = Audit No, Audit Date, Audit Type, Finding No, Finding Level, Section, MOE Procedure, Finding Details, Auditor, Deadline, Responsibility
Fixed Attributes Reply = Audit No, Audit Date, Audit Type, Finding No, Finding Level, Section, MOE Procedure, Finding Details, Auditor, Deadline, Responsibility
Type Audit Date = date
Type Deadline = date
The combination "Required Attributes" and "Fixed Attributes Reply" does not work for date-fields.
As soon as I disclose the date fields from either "Required Attributes" or "Fixed Attributes Reply" the error is no longer evident.
But I want the "Audit Date" and "Deadline" to entered during a new Record and they shall not be changed during a reply.
Is this a bug -or- do I have to change the configuration?
Thanks & regards, Barend |
67588
|
Tue Oct 22 10:54:51 2013 |
| Barend | office@amtc2.com | Question | Windows | 2.9.2 | Re: Error: Attribute <date> not supplied. |
David Pilgram wrote: |
Barend wrote: |
Stefan/Andreas,
When I reply to an existing Logbook entry, I get the error page "Error: Attribute Audit Date not supplied. Please go back and enter the Audit Date field."
The configuration file uses:
Required Attributes = Audit No, Audit Date, Audit Type, Finding No, Finding Level, Section, MOE Procedure, Finding Details, Auditor, Deadline, Responsibility
Fixed Attributes Reply = Audit No, Audit Date, Audit Type, Finding No, Finding Level, Section, MOE Procedure, Finding Details, Auditor, Deadline, Responsibility
Type Audit Date = date
Type Deadline = date
The combination "Required Attributes" and "Fixed Attributes Reply" does not work for date-fields.
As soon as I disclose the date fields from either "Required Attributes" or "Fixed Attributes Reply" the error is no longer evident.
But I want the "Audit Date" and "Deadline" to entered during a new Record and they shall not be changed during a reply.
Is this a bug -or- do I have to change the configuration?
Thanks & regards, Barend
|
Hi Barend,
I can reproduce your point.
I've found various work-arounds, but possibly the best one is to remove "Audit Date" and "Deadline" from the Required Attributes line. True you won't get a warning saying that they were not entered for the first entry (if you didn't enter them, that is), but all subsequent replies run as you would want.
Another way is if you *preview* your entry, you can then submit it and that works. This seems to work by bring up a different page where you can edit all those Fixed Attributes. (I'm not sure that Preview is meant to do that, but it does and it's a work-around).
Or, if you remove "Audit date" and "Deadline" from the Fixed Attributes Reply (as you did) seems to work in the same way. But I see that you don't want the opportunity for these to be changed.
I note that if you get this error message and go back, the message that you may have written is erased (this is unusual, it doesn't do this if you have not supplied an attribute on the first entry, say).
So I suspect this is a bug, possibly not detected before; perhaps no-one had tried this combination. |
Hi David,
Thanks for the reply. I'll review the options and decide what is the best option to move forward.
Regards, Barend |
67589
|
Tue Oct 22 10:56:13 2013 |
| Barend | office@amtc2.com | Bug report | Windows | 2.9.2 | Re: Importing XML/CSV |
Andreas Luedeke wrote: |
Barend wrote: |
Andreas Luedeke wrote: |
Barend wrote: |
Hi Stefan,
I'm experiencing problems importing XML (.csv is not working at all for me).
My logbook contains 3 date-attributes besides the system DATE (entry time), date-format is defined as %d %b %y.
The XML file hold the date format "DD.MM.YYYY"
- During "preview" I see that all entries are listed.
- During the import I get the "wrong date format" error.
- When I review the Summary, I see that only the first XML entry (all 3 date-attributes hold a date) was imported.
- When I try to re-import the XML from the second entry (after removing the 1st entry from XML - this second entry hold NO date-value on one of the date-attributes) the elogd.exe crashes and I get the "Service Temporarily Unavailable" error page.
- When I try to re-import the XML from the modified second entry (after removing the 1st entry from XML - this second entry holds date-value on all of the date-attributes) the elogd.exe crashes and I get the "Service Temporarily Unavailable" error page.
Any suggestion what could be wrong? Is it the missing date-value?
|
Can you post your elog configuration file (elog.cfg)?
⇄
Detect language » English
|
Hi Andreas,
I had to filter-out some other logbook. Please find attached the configuration section for the affected logbook "UMOWY".
Looking forward to your review.
Regards, Barend
|
Hi Barend,
I can confirm that this is a bug of the ELOG import function: if you have a field that is defined as type "date" or "datetime", then elogd requires the value of the field to be of a matching format.
It is not even allowed to omit the time in "datetime" format. If the field is not required in an entry, then it is therefore possible to create an entry that cannot be imported.
I've attached a minimal example elogd.cfg and XML import file to reproduce the problem.
I'm afraid you'll either need to wait for a patch, or you can add dummy dates for all your empty date fields in the XML import file. Just do a "replace all" with your favourite editor; in my example you would e.g. replace all "<D></D>" strings with "<D>01-01-1970</D>" before the import.
⇄
Detect language » English
Cheers, Andreas
⇄
Detect language » English
⇄
Detect language » English
|
Hi Andreas,
Thanks for the reply. The suggested approach is workable, so I'll use that one.
Regards, Barend |
67069
|
Fri May 20 22:45:00 2011 |
| John M O'Donnell | odonnell@lanl.gov | Bug fix | Linux | svn 2414 | my_shell (OS_UNIX) uses /tmp/elog_shell - conflict when more than one elogd runs at the same time | all instances of elogd use the same file name in /tmp when calling my_shell. This can cause some inconsistent behavior when two or more copies of elogd are runnnig at the same time. (eg. one might detect ImageMagik is installed, and the other not,)
The propsed solution is to have the parent read from a pipe to the child rather from a file. A patch is attached. |
Attachment 1: elogd.c.patch_shellPipe
|
--- elogd.c.orig 2011-05-20 13:28:48.000000000 -0600
+++ elogd.c 2011-05-20 14:16:12.000000000 -0600
@@ -866,25 +866,27 @@
#ifdef OS_UNIX
pid_t child_pid;
- int fh, status, i;
+ int fd[2], status, i;
char str[256];
+ /* create pipe for parent<->child communication */
+ if (pipe(fd) < 0)
+ return 0;
+
if ((child_pid = fork()) < 0)
return 0;
else if (child_pid > 0) {
- /* parent process waits for child */
- waitpid(child_pid, &status, 0);
+
+ /* parent does not write to child */
+ close(fd[1]);
/* read back result */
memset(result, 0, size);
- fh = open("/tmp/elog-shell", O_RDONLY);
- if (fh > 0) {
- i = read(fh, result, size);
- close(fh);
- }
+ i = read(fd[0], result, size);
+ close(fd[0]);
- /* remove temporary file */
- remove("/tmp/elog-shell");
+ /* parent process waits for child */
+ waitpid(child_pid, &status, 0);
/* strip trailing CR/LF */
while (strlen(result) > 0 && (result[strlen(result) - 1] == '\r' || result[strlen(result) - 1] == '\n'))
@@ -926,8 +928,7 @@
eprintf("Falling back to user \"%s\"\n", str);
}
- /* execute shell with redirection to /tmp/elog-shell */
- sprintf(str, "/bin/sh -c \"%s\" > /tmp/elog-shell 2>&1", cmd);
+ /* execute command with redirection to pipe to parent */
if (is_verbose()) {
efputs("Going to execute: ");
@@ -935,7 +936,17 @@
efputs("\n");
}
- system(str);
+ /* redirect stdout/stderr to pipe for parent to read */
+ close(STDOUT_FILENO); dup2(fd[1], STDOUT_FILENO);
+ close(STDERR_FILENO); dup2(fd[1], STDERR_FILENO);
+ /* child does not read the pipe */
+ close(fd[0]);
+ /* child nolonger uses fd[1] - use stderr or stdout instead */
+ close(fd[1]);
+
+ if (system(cmd) == -1) {
+ fprintf(stderr, "unable to execute command: %s\n", cmd);
+ }
_exit(0);
}
|
|