twenty icon indicating copy to clipboard operation
twenty copied to clipboard

Field on label should change singular to plural based on relation type

Open ehconitin opened this issue 1 year ago • 22 comments

Current behavior

  1. The field on label is populated with active object, and it doesn't change singular to plural or vice versa based on relation type.

1

Expected behavior

  1. The label field on should automatically change from singular to plural (or vice versa) based on the relation type, unless the user manually edits or changes the field.

ehconitin avatar Oct 14 '24 12:10 ehconitin

This issue is not part of oss.gg hackathon. Please pick a different one or start with a side quest

oss-gg[bot] avatar Oct 14 '24 12:10 oss-gg[bot]

/oss.gg 200

ehconitin avatar Oct 14 '24 12:10 ehconitin

Thanks for opening an issue! It's live on oss.gg!

oss-gg[bot] avatar Oct 14 '24 12:10 oss-gg[bot]

/assign

bunmi-oye avatar Oct 14 '24 12:10 bunmi-oye

Assigned to @Cyanhead! Please open a draft PR linking this issue within 48h ⚠️ If we can't detect a PR from you linking this issue in 48h, you'll be unassigned automatically 🕹️ Excited to have you ship this 🚀

oss-gg[bot] avatar Oct 14 '24 12:10 oss-gg[bot]

/assign

malavshah9 avatar Oct 14 '24 13:10 malavshah9

This issue is already assigned to another person. Please find more issues here.

oss-gg[bot] avatar Oct 14 '24 13:10 oss-gg[bot]

/assign

bibektamang7 avatar Oct 15 '24 11:10 bibektamang7

This issue is already assigned to another person. Please find more issues here.

oss-gg[bot] avatar Oct 15 '24 11:10 oss-gg[bot]

@Cyanhead, Just a little reminder: Please open a draft PR linking this issue within 12 hours. If we can't detect a PR in 12h, you will be unassigned automatically.

oss-gg[bot] avatar Oct 16 '24 00:10 oss-gg[bot]

/assign

Vardhaman619 avatar Oct 16 '24 01:10 Vardhaman619

This issue is already assigned to another person. Please find more issues here.

oss-gg[bot] avatar Oct 16 '24 01:10 oss-gg[bot]

Hi @ehconitin, I'm having some difficulty with where exactly to implement the fix for this issue. I have an idea of the cause, but i'm not sure where/how to pass the data.

PHOTO A: It looks like the reason the plural is not being applied is because the initialRelationFieldMetadataItem.label gotten from the useRelationSettingsFormInitialValues hook doesn't get assigned the correct value.

PHOTO B: initialRelationType receives relationTypeFromFieldMetadata as undefined and defaults to RelationDefinitionType.OneToMany.

PHOTO C: The SettingsDataModelFieldSettingsFormCard component passes three properties, of which relationDefinition needed by the useRelationSettingsFormInitialValues isn't included.

Screenshot 2024-10-16 102328 Screenshot 2024-10-16 102834 Screenshot 2024-10-16 103139

bunmi-oye avatar Oct 16 '24 09:10 bunmi-oye

/assign

P4rthPat3l avatar Oct 16 '24 13:10 P4rthPat3l

This issue is already assigned to another person. Please find more issues here.

oss-gg[bot] avatar Oct 16 '24 13:10 oss-gg[bot]

/assign

vamus092 avatar Oct 22 '24 07:10 vamus092

This issue is already assigned to another person. Please find more issues here.

oss-gg[bot] avatar Oct 22 '24 07:10 oss-gg[bot]

@ehconitin Hello, is this issue still available? Can I work on it?

omarNaifer12 avatar Nov 29 '24 13:11 omarNaifer12

/assign

omarNaifer12 avatar Nov 29 '24 13:11 omarNaifer12

This issue is not part of oss.gg hackathon. Please pick a different one or start with a side quest

oss-gg[bot] avatar Nov 29 '24 13:11 oss-gg[bot]

@FelixMalfait @ehconitin Hello, Sorry for working on this before being assigned. I've completed the task and made a pull request. Please review and let me know if any changes are needed.

Thank you!

omarNaifer12 avatar Nov 29 '24 20:11 omarNaifer12

@omarNaifer12 no problem! Thanks 😊

ehconitin avatar Nov 30 '24 14:11 ehconitin