Skip to content

Commit

Permalink
KostZuweisungsExport: Konten fixed. MyScriptDao: group-check fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
kreinhard committed Jan 20, 2025
1 parent 146694d commit af1dabd
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ class KostZuweisungExport {
}
var konto: KontoDO? = null
if (rechnung is RechnungDO) {
konto = kontoCache.getKontoIfNotInitialized(rechnung.konto)
konto = kontoCache.getKonto(rechnung)
} else if (rechnung is EingangsrechnungDO) {
konto = kontoCache.getKontoIfNotInitialized(rechnung.konto)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class OrderbookSnapshotsSanityCheck(val orderbookSnapshotsService: OrderbookSnap
val orders = orderbookSnapshotsService.readSnapshot(date)
val lastUpdate = orders?.maxOf { it.lastUpdate ?: Date(0L) }
val highestOrderNumber = orders?.maxOf { it.nummer ?: -1 }
jobExecutionContext.addMessage("Snapshot for date $date (${it.size.formatBytes()}) is readable: ${orders?.size?.format()} orders, highest order number=${highestOrderNumber.format()} lastUpdate=${lastUpdate.isoString()}.")
jobExecutionContext.addMessage("Snapshot for date $date (${it.size.formatBytes()}) is readable: ${orders?.size?.format()} orders, highest order number=${highestOrderNumber.format()}, last update of any order=${lastUpdate.isoString()}.")
} catch (e: Exception) {
jobExecutionContext.addError("Error reading snapshot for date $date: $e")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class CronSanityCheckJob {
.add(Html.P("Your ProjectForge system"))
}
msg.content = contextList.getReportAsHtml(showAllMessages = false, intro)
msg.contentType = Mail.CONTENTTYPE_TEXT
msg.contentType = Mail.CONTENTTYPE_HTML
val attachments = listOf(MailAttachment(FILENAME, contextList.getReportAsHtml().toByteArray()))
sendMail.send(msg, null, attachments)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ open class MyScriptDao : AbstractScriptDao() {
}
}
obj.executableByGroupIds?.split(",")?.forEach { groupId ->
groupId.toLongOrNull()?.let { gid ->
groupId.trim().toLongOrNull()?.let { gid ->
if (userGroupCache.isUserMemberOfGroup(userId, gid)) {
// Logged-in user is member of this group listed in executableByGroupIds
return true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ import javax.jcr.Node

private val log = KotlinLogging.logger {}

/**
* Checks the sanity of the JCR repository.
* This job is scheduled by the cron expression in the application.properties file.
*/
@Component
open class JCRCheckSanityCheckJob : AbstractJob("JCR Check Sanity") {
@Autowired
Expand Down

0 comments on commit af1dabd

Please sign in to comment.