Feature #21

Enhance email notification to allow customization via fossology.conf

Added by Mary Laser over 1 year ago. Updated about 1 year ago.

Status:Closed Start date:02/06/2012
Priority:Normal Due date:
Assignee:Mark Donohoe % Done:

0%

Category:Notification
Target version:2.0.0 Estimated time:2.00 hours
Rank: Tester:

Description

Today on IRC we were discussing how to make job notifications more useful and flexible. Here is what we came up with. Consider this a draft and is open to discussion. Comments are welcome.

1) To make the notifications more customizable, add three variables and a new section to fossology.conf:

[EMAILNOTIFY]
header=myheaderfile
footer=myfooterfile
subject=mysubject

When a job completes, the scheduler will send a plain text email notification (if turned on in the user record) to the user. The email will have the subject "mysubject", which by default is "FOSSology scan complete". The scheduler will write into the email:
a) the contents of the file myheaderfile
b) any agent messages
c) the contents of the file myfooterfile

Our default fossology.conf would look like:

[EMAILNOTIFY]
header=emailheader.txt
footer=emailfooter.txt
subject=FOSSology scan complete

Files are located in $SYSCONFDIR.

The contents of emailheader.txt could be:

Your FOSSology scan for $DB.upload.upload_filename has $JOBRESULT.

The contents of emailfooter.txt could be:

Complete job information can be found at $JOBQUEUELINK.

2) the header and footer files can contain variables that will be substituted by the scheduler. Possible variables are:

$BROWSELINK browse link to upload
$JOBQUEUELINK link to job queue details (showjob) $JOBRESULT is "completed successfully" or "failed"
$SCHEDULERLOG link to scheduler log
$UPLOADFOLDERNAME name of upload folder
$DB.tablename.columnname this only applies to certain tables (upload, user, job tables)

3) Agents can add messages to the email notification with a new function call (or macro) NOTIFY_EMAIL(message). It would be good if some agents added a link to the notification with direct links to their results. This applies to nomos, buckets, copyright, and the license list (new) agent.

comments?

Bob Gobeille

History

Updated by Mary Laser over 1 year ago

  • Assignee changed from larry shi to Alex Norton
  • Target version changed from 2.1.0 to 2.0.0

Add email notification changes to FO 2.0 and reassign task to Alex

Updated by Mary Laser over 1 year ago

  • Status changed from New to In Progress

alex: 85% done

Updated by Alex Norton over 1 year ago

  • Status changed from In Progress to Resolved

finished, just needs testing

Updated by Mary Laser over 1 year ago

  • Status changed from Resolved to In Progress
  • Priority changed from Normal to Low

Resulting email on fluffy (shown below) does not include hostname in the URL. This should be fixed, but I'm going to reduce the priority since this is a relatively minor issue.

Return-Path: <>
X-Original-To:
Delivered-To:
Received: by fluffy.ostt (Postfix, from userid 112)
id 253043F4025; Fri, 13 Jan 2012 14:51:17 -0700 (MST)
To: <>
X-Mailer: mail (GNU Mailutils 2.1)
Message-Id: <>
Date: Fri, 13 Jan 2012 14:51:17 -0700 (MST)
From: (fossology)

FOSSology scan complete
FOSSology scan has completed.

http://?mod=showjobs&show=job&job=81
http://?mod=browse&upload=81&show=detail
http://?mod=browse&upload=81&show=detail
http://?mod=browse&upload=81&show=detail
http://?mod=browse&upload=81&show=detail

FOSSology

Updated by Alex Norton over 1 year ago

  • Status changed from In Progress to Resolved

Should be fixed with svn 5415

Updated by Mary Laser over 1 year ago

  • Assignee changed from Alex Norton to Mark Donohoe
  • Priority changed from Low to Normal

Hi Mark, can you add verification of this functionality to your email notification testing, please? thanks.

Updated by Anonymous about 1 year ago

spam post deleted

Updated by Mary Laser about 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF