Repository navigation
MODEXPS-326 - Show CSV output type for CSV orders export jobs - #395
Conversation
The output type was looked up by export type only, so CSV orders exports were labelled "EDIFACT orders export (EDI)". A blank output type of an orders export job with file format CSV is now "Comma-Separated Values (CSV)".
| return result; | ||
| } | ||
|
|
||
| private static String resolveOutputFormat(Job job) { |
There was a problem hiding this comment.
these methods should not be static
There was a problem hiding this comment.
From my understanding, resolveOutputFormat and isCsvOrdersExport only use their Job argument and the static fields OUTPUT_FORMATS and CSV_ORDERS_EXPORT. That's also how I interpret Sonar rule java:S2325 ("Private and final methods that don't access instance data should be static").
So, to me, making these methods static seems to align with the rule. Could you share a bit more about your reasoning? I’d like to better understand your point of view. 🙂
There was a problem hiding this comment.
as for me static is more for utility classes, and here is just service and this method is invoked by non-static method
There was a problem hiding this comment.
Thx! I'll make the change and hopefully Sonar will pass. If not, I'll roll it back. 🙂
|



MODEXPS-326 - Show CSV output type for CSV orders export jobs
Purpose
When a vendor integration exports orders with
fileFormat: CSV, the finished job in Export manager shows Output type "EDIFACT orders export (EDI)".JobServiceImplfills a blankoutputFormatfrom a map keyed only byExportType, and CSV and EDI orders exports shareEDIFACT_ORDERS_EXPORT. ui-export-manager printsoutputFormatas stored, so the fix is backend only.Approach
EDIFACT_ORDERS_EXPORTjob whosevendorEdiOrdersExportConfig.fileFormatisCSVgets "Comma-Separated Values (CSV)" (same text asCIRCULATION_LOGjobs).outputFormatis kept and existing job rows are not migrated, so CSV jobs that already ran still show "(EDI)". Reruns create a new job and get the correct label. (CSV ordering export is currently not in the release)NEWS.md: bug fix entry.