But clicking Refresh Rules does not create any rules:
Expected Behavior
I would expect rules to be created based on these existing Concepts.
Steps To Reproduce
A new Carrot mapper install
Upload a sample scan report
Allocate the ID / Date fields, and allocate the Concepts
Click the Refresh Rules
Environment
- OS: Macos Sonoma
- Other environment details: Developer environment
I'm part of a Project Team
Yes - DRS
Anything else?
This is very much related to #637
But it's important enough to create a new issue I think, as Mapping Rules is pretty much the heart of Carrot, and definitely does prevent this product being deployed elsewhere.
The code that creates the Mapping Rules first has to get the existing Scan Reports concepts _(aside note that the second parameter table_id should be called scan_report_id as that's what is used to filter)_.
This is also filtering using the GenericRelation between ScanReportConcept and ScanReportValue/ScanReportField, so it's using the content_type as mentioned in #637. .filter(concepts__isnull=False)
This time - as the content_type that is being allocated to ScanReportConcept when they are created (15 or 17) is wrong, the filtering will correctly return an empty object. So no rules are created.
Again the fix is to enforce correct use of the Django content_type system.
This is basically a block to use/develop Carrot locally - we can do everything up to Rule generation but after that we're blind to as what might be working.
Are you willing to contribute to resolve this issue?
✅ Yes, me or my team intend to do the development.
Is there an existing issue for this?
Current Behavior
I have existing Concepts in my Scan Report Table:
And my ID / Date fields are allocated:
But clicking Refresh Rules does not create any rules:
Expected Behavior
I would expect rules to be created based on these existing Concepts.
Steps To Reproduce
Environment
I'm part of a Project Team
Yes - DRS
Anything else?
This is very much related to #637
But it's important enough to create a new issue I think, as Mapping Rules is pretty much the heart of Carrot, and definitely does prevent this product being deployed elsewhere.
The code that creates the Mapping Rules first has to get the existing Scan Reports concepts _(aside note that the second parameter
table_id
should be calledscan_report_id
as that's what is used to filter)_.This is also filtering using the
GenericRelation
betweenScanReportConcept
andScanReportValue
/ScanReportField
, so it's using thecontent_type
as mentioned in #637..filter(concepts__isnull=False)
This time - as thecontent_type
that is being allocated to ScanReportConcept when they are created (15
or17
) is wrong, the filtering will correctly return an empty object. So no rules are created.Again the fix is to enforce correct use of the Django
content_type
system.This is basically a block to use/develop Carrot locally - we can do everything up to Rule generation but after that we're blind to as what might be working.
Are you willing to contribute to resolve this issue?
✅ Yes, me or my team intend to do the development.