ID |
Date |
Icon |
Author |
Author Email |
Category |
OS |
ELOG Version |
Subject |
69034
|
Thu Oct 10 12:41:09 2019 |
| Stefan Ritt | stefan.ritt@psi.ch | Question | Windows | 3.4.1 | Re: Author name in reply to entry is from original poster |
Preset on reply Author = $long_name
Max wrote: |
My elog has this config for the author:
Option Author = Filled In Automatically
Preset Author = $Long_name
Locked Attributes = Author
This works as intended: when you submit a new entry, the author name is filled in automatically and cannot be changed.
However, when Alice wants to post a reply to an entry the Bruce has made, the preset author name does not say Alice, it says Bruce. I haven't been able to find out how to change this (other than make the author name editable). Even when Author isn't configured as as locked attribute, it still displays the original author's name.
How can I get this to work like I want/need to?
|
|
67757
|
Wed Jan 21 02:15:12 2015 |
| dev | joshi868b@gmail.com | Question | All | 3.3 | filter with or operation/TIME DURATION CALCULATION |
1.I HAVE A ELOG BOOK WITH TWO ATTRIBUTE 'FROM' &'TO'. I WANT TO USE A FILTER WHICH WILL SEARCH FOR A VALUE IN BOTH ATTRIBUTE .KINDLY HELP ME.
2. HOW TO CALCULATE THE TIME DURATION AUTOMATICALLY BASED ON TWO ATTRIBUTES 'START TIME' AND 'STOP TIME' . |
67758
|
Thu Jan 22 08:35:23 2015 |
| Andreas Luedeke | andreas.luedeke@psi.ch | Question | All | 3.3 | Re: filter with or operation/TIME DURATION CALCULATION |
dev wrote: |
1.I HAVE A ELOG BOOK WITH TWO ATTRIBUTE 'FROM' &'TO'. I WANT TO USE A FILTER WHICH WILL SEARCH FOR A VALUE IN BOTH ATTRIBUTE .KINDLY HELP ME.
2. HOW TO CALCULATE THE TIME DURATION AUTOMATICALLY BASED ON TWO ATTRIBUTES 'START TIME' AND 'STOP TIME' .
|
1a. If you go to the "Find" form, you can add filters on several attribute. The URL of the result page can be bookmarked: this is your filter.
1b. If you define quick filters on FROM and TO, then you can enter filters on both.
2. If you start elogd with the -x option, then you can execute scripts in the "subst" and "subst on edit" commands. Within those shell scripts you can use $START TIME and $STOP TIME to calculate the attributes value. Look for the "Subst" command in the documentation. |
67761
|
Thu Jan 22 17:27:47 2015 |
| dev | joshi868b@gmail.com | Question | All | 3.3 | calculate the value of one attribute depending upon the value of other attribute. |
I HAVE A LOGBOOK WHICH KEEPS THE RECORD OF ALL FAULT BOOKED BY DIFFERENT SUBSCRIBER.THIS LOGBOOK HAS THREE ATTRIBUTE DOWNTIME,UPTIME & TOTAL DURATION (DATE &TIME FORMAT) . I WANT TO CALCULATE THE TOTAL DURATION AUTOMATICALLY WHENEVR UPTIME VALUE IS GIVEN AND IF THE UPTIME IS NOT GIVEN IT SHOULD CALCULATE DEPENDING UPON THE SYSTEM PRESENT TIME.PLEAS EXPLAIN IT WITH EXAMPLE. |
67766
|
Mon Jan 26 15:46:04 2015 |
| dev | joshi868b@gmail.com | Request | All | 3.3 | how to calculate the time |
I HAVE A LOGBOOK WHICH KEEPS THE RECORD OF ALL FAULT BOOKED BY DIFFERENT SUBSCRIBER.THIS LOGBOOK HAS THREE ATTRIBUTE DOWNTIME,UPTIME & TOTAL DURATION (DATE &TIME FORMAT) . I WANT TO CALCULATE THE TOTAL DURATION AUTOMATICALLY WHENEVR UPTIME VALUE IS GIVEN AND IF THE UPTIME IS NOT GIVEN IT SHOULD CALCULATE DEPENDING UPON THE SYSTEM PRESENT TIME.PLEAS EXPLAIN IT WITH EXAMPLE. |
67767
|
Mon Jan 26 15:56:41 2015 |
| Andreas Luedeke | andreas.luedeke@psi.ch | Question | All | 3.3 | Re: calculate the value of one attribute depending upon the value of other attribute. |
If you have the following elogd.cfg:
Attributes = START, END, DURATION
subst DURATION = $shell( /usr/local/elog/diff.sh \"$START\" \"$END\")
Show Attributes Edit = START, END
And the shell script /usr/local/elog/diff.sh is:
#!/bin/sh
s1=$(date -d "$1" +%s)
s2=$(date -d "$2" +%s)
d=$(echo "($s2-$s1)/3600"|bc -lq)
printf "%.0f hours" $d
Then DURATION is calculated from START and END in full hours.
It appears that if you define START and END as "datetime", then only the date part would be passed to the script. This may is a bug of elogd: Stefan, have you ever tried?
dev wrote: |
I HAVE A LOGBOOK WHICH KEEPS THE RECORD OF ALL FAULT BOOKED BY DIFFERENT SUBSCRIBER.THIS LOGBOOK HAS THREE ATTRIBUTE DOWNTIME,UPTIME & TOTAL DURATION (DATE &TIME FORMAT) . I WANT TO CALCULATE THE TOTAL DURATION AUTOMATICALLY WHENEVR UPTIME VALUE IS GIVEN AND IF THE UPTIME IS NOT GIVEN IT SHOULD CALCULATE DEPENDING UPON THE SYSTEM PRESENT TIME.PLEAS EXPLAIN IT WITH EXAMPLE.
|
PS: Please do NOT write all capital text in a forum. Thank you! |
67768
|
Mon Jan 26 19:24:02 2015 |
| dev | joshi868b@gmail.com | Question | All | 3.3 | Re: calculate the value of one attribute depending upon the value of other attribute. |
I tried that It is not calculating and it is giving the error "Shell execution not enabled via -x flag ".I started elogd -x from command prompt it still gives the same error.
Andreas Luedeke wrote: |
If you have the following elogd.cfg:
Attributes = START, END, DURATION
subst DURATION = $shell( /usr/local/elog/diff.sh \"$START\" \"$END\")
Show Attributes Edit = START, END
And the shell script /usr/local/elog/diff.sh is:
#!/bin/sh
s1=$(date -d "$1" +%s)
s2=$(date -d "$2" +%s)
d=$(echo "($s2-$s1)/3600"|bc -lq)
printf "%.0f hours" $d
Then DURATION is calculated from START and END in full hours.
It appears that if you define START and END as "datetime", then only the date part would be passed to the script. This may is a bug of elogd: Stefan, have you ever tried?
dev wrote: |
I HAVE A LOGBOOK WHICH KEEPS THE RECORD OF ALL FAULT BOOKED BY DIFFERENT SUBSCRIBER.THIS LOGBOOK HAS THREE ATTRIBUTE DOWNTIME,UPTIME & TOTAL DURATION (DATE &TIME FORMAT) . I WANT TO CALCULATE THE TOTAL DURATION AUTOMATICALLY WHENEVR UPTIME VALUE IS GIVEN AND IF THE UPTIME IS NOT GIVEN IT SHOULD CALCULATE DEPENDING UPON THE SYSTEM PRESENT TIME.PLEAS EXPLAIN IT WITH EXAMPLE.
|
PS: Please do NOT write all capital text in a forum. Thank you!
|
|
67770
|
Tue Jan 27 15:59:59 2015 |
| Andreas Luedeke | andreas.luedeke@psi.ch | Question | All | 3.3 | Re: calculate the value of one attribute depending upon the value of other attribute. |
Yes, I forgot to mention that you need to enable shell script execution by starting the server with "elogd -x".
Before you start elogd from the command line you need to shutdown any running elogd; otherwise the port is blocked and the command line elogd cannot start: "sudo /sbin/service elogd stop"
From Linux you can edit instead /etc/init.d/elogd and add there the option "-x" to the line where "elogd" is started and then restart the service: "sudo /sbin/service elogd restart".
dev wrote: |
I tried that It is not calculating and it is giving the error "Shell execution not enabled via -x flag ".I started elogd -x from command prompt it still gives the same error.
Andreas Luedeke wrote: |
If you have the following elogd.cfg:
Attributes = START, END, DURATION
subst DURATION = $shell( /usr/local/elog/diff.sh \"$START\" \"$END\")
Show Attributes Edit = START, END
And the shell script /usr/local/elog/diff.sh is:
#!/bin/sh
s1=$(date -d "$1" +%s)
s2=$(date -d "$2" +%s)
d=$(echo "($s2-$s1)/3600"|bc -lq)
printf "%.0f hours" $d
Then DURATION is calculated from START and END in full hours.
It appears that if you define START and END as "datetime", then only the date part would be passed to the script. This may is a bug of elogd: Stefan, have you ever tried?
dev wrote: |
I HAVE A LOGBOOK WHICH KEEPS THE RECORD OF ALL FAULT BOOKED BY DIFFERENT SUBSCRIBER.THIS LOGBOOK HAS THREE ATTRIBUTE DOWNTIME,UPTIME & TOTAL DURATION (DATE &TIME FORMAT) . I WANT TO CALCULATE THE TOTAL DURATION AUTOMATICALLY WHENEVR UPTIME VALUE IS GIVEN AND IF THE UPTIME IS NOT GIVEN IT SHOULD CALCULATE DEPENDING UPON THE SYSTEM PRESENT TIME.PLEAS EXPLAIN IT WITH EXAMPLE.
|
PS: Please do NOT write all capital text in a forum. Thank you!
|
|
|