Skip to content

Commit

Permalink
Merge pull request #262 from micromata/Release-8.1-SNAPSHOT
Browse files Browse the repository at this point in the history
Release 8.1 snapshot
KostZuweisungsExport: Konten fixed. MyScriptDao: group-check fixed.
  • Loading branch information
kreinhard authored Jan 20, 2025
2 parents ef664a3 + af1dabd commit 3e69065
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 16 deletions.
5 changes: 0 additions & 5 deletions ToDo.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
==== Aktuell:
- History-Entries für EmployeeValidityAttrDO werden nicht ordentlich geschrieben.
- JCR: Tool for removing or recovering orphaned nodes.
- Favoriten bei Scriptausführung für Parameter.
- KI-Anteil in Zeitberichten
Expand All @@ -15,7 +14,6 @@
- Kalendereinträge und Subscriptions.
- LoginProtection: Increases penalty time for DAV only after 5 tries.
- Auftragsbuch nächtlich persistieren (als json-zip) für Forecast-Vergleiche.
- Apple for Webauthn4j
- Abwesenheiten
- Fakturaquote Monatsbericht
Expand All @@ -36,10 +34,7 @@ History
- ProjektEdit: History enthält keine neuen Kost2DOs/Arten (Einträge sind aber da).
- CronReindexingHourlyJob ohne Effekt.
- Reindizierung der letzten n einträge nicht migriert (sinnvoll?).
- history-entries bei EmployeeValidityAttrDO nichtssagend.
- HistoryEntry: EmployeeValidityAttrDO.insert muss sinnvoll für Anzeige formatiert werden.
- PFHistoryMasterDO: Indexe setzen, wenn Einträge wieder gehen.
- XML-Import für Testsystem
- UserRightId: ClassBridge müsste eigentlich in die Felder der benutzenden DOs
- reindexing settings implementieren. Aktuell wird nur komplett gemass-indexed.
- History of AddressCampaignValueDO's (AddressCampaignValueDao.convertToDisplayHistoryEntries removed)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ class EmployeeValidSinceAttrHistoryAdapter : HistoryFormatAdapter() {
})
}
displayHistoryEntry.attributes.forEach { attr ->
val displayPropname = attr.displayPropertyName ?: ""
attr.displayPropertyName = if (attr.displayPropertyName.isNullOrEmpty()) {
val displayPropname = attr.displayPropertyName
attr.displayPropertyName = if (displayPropname.isNullOrEmpty()) {
prefix
} else {
"$prefix.${attr.displayPropertyName}"
"$prefix.$displayPropname"
}
}
}
Expand Down
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 @@ -40,6 +40,10 @@ class DisplayHistoryEntry {
var modifiedByUserId: Long? = null
var modifiedByUser: String? = null
var operationType: EntityOpType? = null
set(value) {
field = value
operation = HistoryFormatService.translate(value)
}
var operation: String? = null
var attributes = mutableListOf<DisplayHistoryEntryAttr>()

Expand All @@ -53,7 +57,6 @@ class DisplayHistoryEntry {
entry.modifiedByUserId = modifiedByUser?.id
entry.modifiedByUser = modifiedByUser?.getFullname() ?: historyEntry.modifiedBy
entry.operationType = historyEntry.entityOpType
entry.operation = HistoryFormatService.translate(historyEntry.entityOpType)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ package org.projectforge.framework.persistence.history
class DisplayHistoryEntryAttr {
var id: Long? = null
var operationType: PropertyOpType? = null
set(value) {
field = value
operation = HistoryFormatService.translate(value)
}
var operation: String? = null
var propertyName: String? = null
var displayPropertyName: String? = null
Expand All @@ -39,7 +43,6 @@ class DisplayHistoryEntryAttr {
return DisplayHistoryEntryAttr().also {
it.id = attr.id
it.operationType = attr.opType
it.operation = HistoryFormatService.translate(attr.opType)
it.propertyName = HistoryFormatUtils.getPlainPropertyName(attr)
it.displayPropertyName = attr.displayPropertyName
if (it.displayPropertyName == null && entityClass != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ class HistoryFormatService {
// Add the operation as attribute, if a propertyPrefix is given.
displayHistoryEntry.attributes.add(DisplayHistoryEntryAttr().also { attr ->
attr.operationType = PropertyOpType.Insert
attr.operation = context.requiredDisplayHistoryEntry.operation
attr.displayPropertyName = propertyPrefix
attr.newValue = attr.operation
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ class HistoryFormatUserRightAdapter(
}
attr.newValue = if (valueI18nKey != null) translate(valueI18nKey) else right.value?.toString()
attr.operationType = propertyOpType
attr.operation = HistoryFormatService.translate(propertyOpType)
}
}
}
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 3e69065

Please sign in to comment.