Re: enableSignatureForReporting: Cannot find signature...

36 views
Skip to first unread message

Giovanni Biscuolo

unread,
Jun 25, 2021, 9:32:26 AM6/25/21
to TaskJuggler Users
Giovanni Biscuolo <g...@xelera.eu> writes:

[...]

> I get an error, this is the relevant timesheets.log part:
>
> --8<---------------cut here---------------start------------->8---
>
> 2021-06-24 21:20:33 INFO tj3ts_sender: Retrieving resource list...
> 2021-06-24 21:20:33 INFO tj3ts_sender: 6 resources found
> 2021-06-24 21:20:33 INFO tj3ts_sender: Generating template for CEO...
> 2021-06-24 21:20:34 INFO tj3ts_sender: Generating template for dev1...
> 2021-06-24 21:20:35 INFO tj3ts_sender: Generating template for dev2...
> 2021-06-24 21:20:36 INFO tj3ts_sender: Generating template for dev3...
> 2021-06-24 21:20:37 INFO tj3ts_sender: Generating template for doc...
> 2021-06-24 21:20:38 INFO tj3ts_sender: Generating template for test...
> 2021-06-24 21:21:09 ERROR tj3ts_sender: enableSignatureForReporting: Cannot find signature in file TimeSheetTemplates/2021-07-05/CEO_2021-07-05.tji
>
> --8<---------------cut here---------------end--------------->8---
>
> I don't understand what I'm doing wrong here: please any hint about the
> last ERROR?

Forgot to mention that the file
TimeSheetTemplates/2021-07-05/CEO_2021-07-05.tji is created and this is
the content:

--8<---------------cut here---------------start------------->8---


# The status headline should be no more than 60 characters and may
# not be empty! The status summary is optional and should be no
# longer than one or two sentences of plain text. The details section
# is also optional has no length limitation. You can use simple
# markup in this section. It is recommended that you provide at
# least a summary or a details section.
# See http://www.taskjuggler.org/tj3/manual/timesheet.html for details.
#
# --------8<--------8<--------
timesheet CEO 2021-06-28-00:00-+0000 - 2021-07-05-00:00-+0000 {

# Vacation time: 0.0%

# There were no planned tasks assignments for this period!

# If you had unplanned tasks, uncomment and fill out the
# following lines:
# newtask new.task.id "A task title" {
# work X%
# remaining Y.Yd
# status green "Your headline here!" {
# summary -8<-
# A summary text
# ->8-
# details -8<-
# Some more details
# ->8-
# flags ...
# }
# }

# You can use the following section to report personal notes.
# status green "Your headline here!" {
# summary -8<-
# A summary text
# ->8-
# details -8<-
# Some more details
# ->8-
# }

# You have no future assignments for this project!
}
# -------->8-------->8--------

--8<---------------cut here---------------end--------------->8---

Thanks! Gio'

--
Giovanni Biscuolo

Xelera IT Infrastructures
signature.asc

Giovanni Biscuolo

unread,
Jun 25, 2021, 9:32:26 AM6/25/21
to TaskJuggler Users
Hello tj3 users!

I'm learning tj3 and I'm trying to set up the status tracking system as
documented here
https://taskjuggler.org/tj3/manual/Day_To_Day_Juggling.html#Implementing_the_status_tracking_system

I'm using a dedicated user named "taskjuggler" with
/home/taskjuggler/projects/ as the directory for my projects

/home/taskjuggler/projects/.taskjugglerrc:

--8<---------------cut here---------------start------------->8---

_global:
emailDeliveryMethod: sendmail
authKey: topsecret
webServerPort: 8090
scmCommand: "git add %f ; git commit -m '%m' %f"
projectId: proj001
_log:
logLevel: 4
outputLevel: 4
_timesheets:
senderEmail: 'TaskJuggler <tj3-demo@my_secret_domain.com>'
_sender:
hideResource: '~isleaf()'
_summary:
sheetRecipients:
- team@my_secret_domain.com
digestRecipients:
- managers@my_secret_domain.com

--8<---------------cut here---------------end--------------->8---

The tj3d (daemon) and the web interface is running fine: I can add
projects with tj3client and see all my HTML reports (two test projects
adapted from the tutorial) at https://localhost:8090

If I try to generate the timesheets with this command:

--8<---------------cut here---------------start------------->8---

taskjuggler@roquette:~/projects$ tj3ts_sender --dryrun -f -e 2021-07-05

--8<---------------cut here---------------end--------------->8---

I get an error, this is the relevant timesheets.log part:

--8<---------------cut here---------------start------------->8---

2021-06-24 21:20:33 INFO tj3ts_sender: Retrieving resource list...
2021-06-24 21:20:33 INFO tj3ts_sender: 6 resources found
2021-06-24 21:20:33 INFO tj3ts_sender: Generating template for CEO...
2021-06-24 21:20:34 INFO tj3ts_sender: Generating template for dev1...
2021-06-24 21:20:35 INFO tj3ts_sender: Generating template for dev2...
2021-06-24 21:20:36 INFO tj3ts_sender: Generating template for dev3...
2021-06-24 21:20:37 INFO tj3ts_sender: Generating template for doc...
2021-06-24 21:20:38 INFO tj3ts_sender: Generating template for test...
2021-06-24 21:21:09 ERROR tj3ts_sender: enableSignatureForReporting: Cannot find signature in file TimeSheetTemplates/2021-07-05/CEO_2021-07-05.tji

--8<---------------cut here---------------end--------------->8---

I don't understand what I'm doing wrong here: please any hint about the
last ERROR?

Happy hacking! Gio'
signature.asc

Giovanni Biscuolo

unread,
Jun 25, 2021, 1:15:29 PM6/25/21
to TaskJuggler Users
Hello,

I think I've found the issue, but please consider I'm not a Ruby expert
so take my expanation with a grain of salt.

Giovanni Biscuolo <g...@xelera.eu> writes:

[...]

>> 2021-06-24 21:21:09 ERROR tj3ts_sender: enableSignatureForReporting: Cannot find signature in file TimeSheetTemplates/2021-07-05/CEO_2021-07-05.tji

This error is triggered by the function
enableSignatureForReporting(templateFile) in /lib/taskjuggler/SheetSender.rb.200

AFAIU that function checks that in the template to be sent there is at
least a line matching the @signatureFilter regex

AFAIU the TimeSheetSender (file ) is a class of SheetSender, with the
@signatureFilter (line 41) defined like this:

--8<---------------cut here---------------start------------->8---

@signatureFilter = /^[ ]*timesheet\s[a-z][a-z0-9_]*\s([0-9:\-+]*\s-\s[0-9:\-+]*)/

--8<---------------cut here---------------end--------------->8---

This means that uppercase letters in the signature are not valid: am I
right?

> Forgot to mention that the file
> TimeSheetTemplates/2021-07-05/CEO_2021-07-05.tji is created and this is
> the content:

[...]

> # --------8<--------8<--------
> timesheet CEO 2021-06-28-00:00-+0000 - 2021-07-05-00:00-+0000 {

[...]

Im my case one of the declared resources had "CEO" (uppercase) ad ID and
this caused that line not to be recognised as a valid signature.

My workaround was to replace "CEO" with "ceo" in all resources
references and it worked, now I'm able to send timesheets with
tj3ts_sender.

The manual [1] states this about IDs:

--8<---------------cut here---------------start------------->8---

An identifier is composed of the letters a to z, A to Z, the underscore
and the digits 0 to 9. There are no limits for the number of characters,
but it may not begin with a digit.

--8<---------------cut here---------------end--------------->8---

So I think I've found a bug... I'm going to report it upstream via
GitHub.

Happy hacking! Gio'


[1] https://taskjuggler.org/tj3/manual/The_TaskJuggler_Syntax.html#ID
signature.asc

Giovanni Biscuolo

unread,
Jun 26, 2021, 4:28:02 AM6/26/21
to TaskJuggler Users
Giovanni Biscuolo <g...@xelera.eu> writes:

[...]

> So I think I've found a bug... I'm going to report it upstream via
> GitHub.

For the records, the but is #259
https://github.com/taskjuggler/TaskJuggler/issues/259

Happy hacking! Gio'
signature.asc
Reply all
Reply to author
Forward
0 new messages