EdiCondition not working to RFF+CR
- Dominant language
- C#
- Stars
- 490
- Forks
- 173
- PR merge metrics
- No merged PRs in 30d
Description
Thank you for putting in the work and making this library available.
I am trying to parse an EDIFACT 01B file and I am having troubles in constructing my custom classes to read an EDIFACT file.
I am trying to map the RFF+CR with no success. I am brand new on EDIFACT, so possible I am doing something wrong here.
```
LIN+00010++000000000060325004:IN'
IMD+++:::VALVE,TEST,FULLPORT,1IN,SS,FLG'
QTY+21:9.000'
DTM+50:20240422:102'
DTM+2:20240422:102'
MOA+203:81'
GIN+BN+FG125'
PRI+INF'
CUX+2:AUD:9'
RFF+CR:S/F, P4, TEST'
RFF+AEU:TEST_Exw W AUS-S/F'
RFF+WS:MAIN'
PAC+++EA'
TDT+20++G4'
LIN+00020++000000000060367095:IN'
IMD+++:::VALVE,GATE,KNIFE,200MM,CS,WAFER'
QTY+21:11.000'
DTM+50:20240819:102'
DTM+2:20240819:102'
MOA+203:44'
GIN+BN+200NB ANSI150'
PRI+INF'
CUX+2:AUD:9'
RFF+CR:TEST,TEST,s/f,p4'
RFF+AEU:Test_Exw W AUS-S/F'
RFF+WS:MAIN'
PAC+++EA'
TDT+20++G4'
```
My code:
```csharp
[EdiSegment, EdiSegmentGroup("LIN", SequenceEnd = "TDT")]
public class LineItem
{
[EdiValue("X(1)", Path = "LIN/0/0")]
public string LineNumber { get; set; }
[EdiValue("9(3)", Path = "QTY/0/1")]
public string Qty { get; set; }
[EdiValue("9(3)", Path = "LIN/1/0")]
public string Code { get; set; }
[EdiValue("9(3)", Path = "LIN/2/0")]
public string Unit { get; set; }
[EdiValue("9(3)", Path = "LIN/2/1")]
public string Type { get; set; }
[EdiCondition("2", Path = "DTM/0/0")]
public Date ActualDeliveryData { get; set; } //ATA
[EdiCondition("50", Path = "DTM/0/0")]
public Date ExpectedShipDate { get; set; } //ETD
public PriceDetails Prices { get; set; }
[EdiValue("X(256)", Path = "IMD/2/3")]
public string ItemDescription { get; set; }
[EdiCondition("CR", Path = "RFF/0")]
public Reference OtherReferences { get; set; }
}
```
Thank you
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the sample EDIFACT input with the LineItem mapping shown in the issue, focusing on the RFF+CR segment and its EdiCondition path. Inspect how EdiCondition resolves RFF values, then verify that OtherReferences is populated for RFF+CR while the existing DTM conditions still work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100