culturecreates / footlight-app

Footlight CMS Front-end
https://cms.footlight.io
2 stars 0 forks source link

bugs when creating a new taxonomy #1129

Closed troughc closed 1 week ago

troughc commented 4 weeks ago

I think Taxonomies needs to be retested thoroughly.

SyamBabu-M commented 3 weeks ago

@dev-aravind there seems to be a backend issue while saving taxonomy. Please look into this.

dev-aravind commented 3 weeks ago

@SyamBabu-M The bug is fixed in staging please have a look and let me know if you find any issues.

SyamBabu-M commented 3 weeks ago

@dev-aravind I just found a new bug in taxonomy. There is an issue with how adminOnly is handled in the add taxonomy API. It works fine with edit taxonomy API. Please look into this.

dev-aravind commented 3 weeks ago

@troughc This is fixed in staging now. You can check the linked PR to test this.

troughc commented 3 weeks ago

Tests: Tested: there is no admin only field included when you are mapping a new taxonomy to an existing field. PASSED

Tested: You should not be able to change class type in the second screen (you choose it on the first screen). This is not true when you are creating a taxonomy for an existing or new field. the class type should be grayed out: PASSED

Tested: I am getting an error in staging when I try to create and SAVE a new taxonomy in Tout Culture - (test taxonomy). It said it already existed, however, it then created it anyway

Image

Image

troughc commented 3 weeks ago

Two new issues have been discovered when testing this:

@sahalali should these bugs be addressed in this issue or should we open a new issue?

sahalali commented 2 weeks ago

Can you please review this in prod?

troughc commented 2 weeks ago

Hey there, whilst writing up the help guide, I tried to make Disciplines and Event types available as a Filter from the Signe Laval calendar. When I tried to save the taxonomy I got an error message - that the name was already used. I think this is because Maude from Signe Laval renamed Event type 'Discipline" and then created a custom taxonomy called "Event type" (but all in French). @AbhishekPAnil you can ask @saumier about this if you don't remember - I may not be in the meeting tomorrow (but I will try to join).

Custom taxonomy:

Image

Renamed Standard taxonomy:

Image

AbhishekPAnil commented 2 weeks ago

Can you please review this in prod? @sahalali I tested this in prod and this is working fine in production.

AbhishekPAnil commented 2 weeks ago

cc @AbhishekPAnil Test the issue Caitlin in the above comment https://github.com/culturecreates/footlight-app/issues/1129#issuecomment-2153095291.

AbhishekPAnil commented 1 week ago

cc @SyamBabu-M Please check and rectify this code and its other parts .

<Col style={{ flex: '1' }}>
                        <DateAction
                          iconrender={<PlusOutlined style={{ fontSize: '24px' }} />}
                          label={t('dashboard.taxonomy.selectType.newField')}
                          style={{ height: '104px', padding: 16 }}
                          onClick={() => navigationHandler('not-dynamic')}
                        />
                      </Col>
                      <Col style={{ flex: '1' }}>
                        <DateAction
                          data-cy="button-taxonomy-existing-field"
                          iconrender={<DatabaseOutlined style={{ fontSize: '24px' }} />}
                          label={t('dashboard.taxonomy.selectType.existingField')}
                          disabled={standardFields.length < 1 && selectedClass.label !== '' ? true : false}
                          style={{
                            height: '104px',
                            padding: 16,
                            ...(standardFields.length < 1 && selectedClass.label !== '' && buttonStyles),
                          }}
                          onClick={() => navigationHandler('dynamic')}
                        />
                      </Col>

I think there might be a logical issue here and that might have caused the mappedToField to appear in the backend.

SyamBabu-M commented 1 week ago

@AbhishekPAnil I have added the potential fix.

troughc commented 1 week ago

Make sure that user cannot create two taxonomies of same name in the same class. Make sure that standard and dynamic taxonomies can be created and updated. copy paste current create a new taxonomy link into a new tab and try to create a new dynamic taxonomy from there.

troughc commented 1 week ago

Tested on Chrome

  1. Make sure that user cannot create two taxonomies of same name in the same class: When I try to save a new taxonomy with same name of an existing taxonomy in the same class, I get sent to an error page: Image

Expected behaviour: Instead, I should see this message but stay on the page (similar to the one shown above, but reworded). Ideally I would like the message to appear in red below the Taxonomy name field. If this is not possible, please use a popup message. English This taxonomy name is already taken. Please choose another name.
French Ce nom de taxonomie est déjà pris. Veuillez choisir un autre nom.

  1. Make sure that standard and dynamic taxonomies can be created and updated: PASSED
  2. copy paste current create a new taxonomy link into a new tab and try to create a new dynamic taxonomy from there: I copied the link of the first page (where you select your class) to a new tab and then continued creating a new taxonomy: PASSED I then copied the link of the next page, (where you fill in the details) to a new tab: the new tab always shows a CUSTOM details page, with Event selected (irregardless of what i selected - for example if I selected place/standard taxonomy, in the copied URL, I go to event custom details). That's a bit strange, but it doesn't cause any problems so I am not worried about it: PASSED
troughc commented 1 week ago

@AbhishekPAnil can you deploy this one too? cc @SyamBabu-M