Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

react: In a few scenarios, the entity list page can invoke up to 4 calls to the backend API #11222

Closed
1 task done
vishal423 opened this issue Feb 1, 2020 · 12 comments · Fixed by #11224
Closed
1 task done
Labels
area: bug 🐛 $$ bug-bounty $$ https://www.jhipster.tech/bug-bounties/ theme: react $100 https://www.jhipster.tech/bug-bounties/
Milestone

Comments

@vishal423
Copy link
Contributor

vishal423 commented Feb 1, 2020

Overview of the issue

In a few scenarios, the react entity list page (like with elastic search) contains 4 useEffects hooks definitions to invoke four back-end APIs (three calls to the same API and one to search endpoint).

API calls being made on the list page:

Motivation for or Use Case
  • The response of the above calls varies; especially the search endpoint as that returns the empty array when the query parameter is empty. Considering the response uncertainty and race conditions of API calls, you may view the correct # of records on the list page or an empty record label. In the later situation, the create e2e test case assertion fails and the subsequent delete test also fails.
  • If you generate a fresh entity (with elastic search), then, the navigation to the list page shows 500 error message alert. It is due to the implicit search call being made and that fails as the index hasn't yet been created for the entity. If you create a new record for the entity, then, this error goes away.
Reproduce the error
  • Generate react monolithic application with below suggested .yo-rc.json and the entities.
  • Navigate to list page of an entity (e.g. EntityWithPaginationAndDTO). Check Network tab to see 4 calls to backend.
Related issues

#10824

Suggest a Fix
JHipster Version(s)

v6.6.0

JHipster configuration
.yo-rc.json file
{
  "generator-jhipster": {
    "applicationType": "monolith",
    "baseName": "samplePsqlEsNoi18nMapsIdWithReact",
    "packageName": "io.github.jhipster.sample",
    "packageFolder": "io/github/jhipster/sample",
    "serverPort": "8080",
    "authenticationType": "jwt",
    "cacheProvider": "hazelcast",
    "enableHibernateCache": true,
    "websocket": false,
    "databaseType": "sql",
    "devDatabaseType": "postgresql",
    "prodDatabaseType": "postgresql",
    "searchEngine": "elasticsearch",
    "buildTool": "maven",
    "enableSwaggerCodegen": false,
    "jwtSecretKey": "xx",
    "clientFramework": "react",
    "useSass": true,
    "clientPackageManager": "npm",
    "testFrameworks": ["gatling", "protractor"],
    "jhiPrefix": "jhi",
    "otherModules": [],
    "enableTranslation": false,
    "messageBroker": false,
    "serviceDiscoveryType": false,
    "embeddableLaunchScript": false,
    "clientTheme": "none",
    "entitySuffix": "",
    "dtoSuffix": "DTO",
    "blueprints": [],
    "jhipsterVersion": "6.6.0",
    "creationTimestamp": 1580438567472
  }
}
Entity configuration(s) entityName.json files generated in the .jhipster directory
JDL entity definitions
entity BankAccount {
  name String required,
  guid UUID,
  bankNumber Integer,
  agencyNumber Long,
  lastOperationDuration Float,
  meanOperationDuration Double,
  meanQueueDuration Duration,
  balance BigDecimal required,
  openingDay LocalDate,
  lastOperationDate Instant,
  active Boolean,
  accountType BankAccountType,
  attachment AnyBlob,
  description TextBlob
}
entity Label {
  labelName String required minlength(3)
}
entity Operation {
  date Instant required,
  description String,
  amount BigDecimal required
}
entity FieldTestEntity {
  stringTom String,
  stringRequiredTom String required,
  stringMinlengthTom String minlength(0),
  stringMaxlengthTom String maxlength(20),
  stringPatternTom String pattern(/^[a-zA-Z0-9]*$/),
  numberPatternTom String pattern(/^[0-9]+$/),
  numberPatternRequiredTom String pattern(/^[0-9]+$/) required,
  integerTom Integer,
  integerRequiredTom Integer required,
  integerMinTom Integer min(0),
  integerMaxTom Integer max(100),
  longTom Long,
  longRequiredTom Long required,
  longMinTom Long min(0),
  longMaxTom Long max(100),
  floatTom Float,
  floatRequiredTom Float required,
  floatMinTom Float min(0),
  floatMaxTom Float max(100),
  doubleRequiredTom Double required,
  doubleMinTom Double min(0),
  doubleMaxTom Double max(100),
  bigDecimalRequiredTom BigDecimal required,
  bigDecimalMinTom BigDecimal min(0),
  bigDecimalMaxTom BigDecimal max(100),
  localDateTom LocalDate,
  localDateRequiredTom LocalDate required,
  instantTom Instant,
  instantRequiredTom Instant required,
  zonedDateTimeTom ZonedDateTime,
  zonedDateTimeRequiredTom ZonedDateTime required,
  durationTom Duration,
  durationRequiredTom Duration required,
  booleanTom Boolean,
  booleanRequiredTom Boolean required,
  enumTom EnumFieldClass,
  enumRequiredTom EnumRequiredFieldClass required,
  uuidTom UUID,
  uuidRequiredTom UUID required,
  byteImageTom ImageBlob,
  byteImageRequiredTom ImageBlob required,
  byteImageMinbytesTom ImageBlob minbytes(0),
  byteImageMaxbytesTom ImageBlob maxbytes(10000),
  byteAnyTom AnyBlob,
  byteAnyRequiredTom AnyBlob required,
  byteAnyMinbytesTom AnyBlob minbytes(0),
  byteAnyMaxbytesTom AnyBlob maxbytes(10000),
  byteTextTom TextBlob,
  byteTextRequiredTom TextBlob required
}
entity FieldTestInfiniteScrollEntity {
  stringHugo String,
  stringRequiredHugo String required,
  stringMinlengthHugo String minlength(0),
  stringMaxlengthHugo String maxlength(20),
  stringPatternHugo String pattern(/^[a-zA-Z0-9]*$/),
  integerHugo Integer,
  integerRequiredHugo Integer required,
  integerMinHugo Integer min(0),
  integerMaxHugo Integer max(100),
  longHugo Long,
  longRequiredHugo Long required,
  longMinHugo Long min(0),
  longMaxHugo Long max(100),
  floatHugo Float,
  floatRequiredHugo Float required,
  floatMinHugo Float min(0),
  floatMaxHugo Float max(100),
  doubleRequiredHugo Double required,
  doubleMinHugo Double min(0),
  doubleMaxHugo Double max(100),
  bigDecimalRequiredHugo BigDecimal required,
  bigDecimalMinHugo BigDecimal min(0),
  bigDecimalMaxHugo BigDecimal max(100),
  localDateHugo LocalDate,
  localDateRequiredHugo LocalDate required,
  instantHugo Instant,
  instanteRequiredHugo Instant required,
  zonedDateTimeHugo ZonedDateTime,
  zonedDateTimeRequiredHugo ZonedDateTime required,
  durationHugo Duration,
  durationRequiredHugo Duration required,
  booleanHugo Boolean,
  booleanRequiredHugo Boolean required,
  enumHugo EnumFieldClass,
  enumRequiredHugo EnumRequiredFieldClass required,
  uuidHugo UUID,
  uuidRequiredHugo UUID required,
  byteImageHugo ImageBlob,
  byteImageRequiredHugo ImageBlob required,
  byteImageMinbytesHugo ImageBlob minbytes(0),
  byteImageMaxbytesHugo ImageBlob maxbytes(10000),
  byteAnyHugo AnyBlob,
  byteAnyRequiredHugo AnyBlob required,
  byteAnyMinbytesHugo AnyBlob minbytes(0),
  byteAnyMaxbytesHugo AnyBlob maxbytes(10000),
  byteTextHugo TextBlob,
  byteTextRequiredHugo TextBlob required
}
entity FieldTestMapstructEntity {
  stringEva String,
  stringRequiredEva String required,
  stringMinlengthEva String minlength(0),
  stringMaxlengthEva String maxlength(20),
  stringPatternEva String pattern(/^[a-zA-Z0-9]*$/),
  integerEva Integer,
  integerRequiredEva Integer required,
  integerMinEva Integer min(0),
  integerMaxEva Integer max(100),
  longEva Long,
  longRequiredEva Long required,
  longMinEva Long min(0),
  longMaxEva Long max(100),
  floatEva Float,
  floatRequiredEva Float required,
  floatMinEva Float min(0),
  floatMaxEva Float max(100),
  doubleRequiredEva Double required,
  doubleMinEva Double min(0),
  doubleMaxEva Double max(100),
  bigDecimalRequiredEva BigDecimal required,
  bigDecimalMinEva BigDecimal min(0),
  bigDecimalMaxEva BigDecimal max(100),
  localDateEva LocalDate,
  localDateRequiredEva LocalDate required,
  instantEva Instant,
  instanteRequiredEva Instant required,
  zonedDateTimeEva ZonedDateTime,
  zonedDateTimeRequiredEva ZonedDateTime required,
  durationEva Duration,
  durationRequiredEva Duration required,
  booleanEva Boolean,
  booleanRequiredEva Boolean required,
  enumEva EnumFieldClass,
  enumRequiredEva EnumRequiredFieldClass required,
  uuidEva UUID,
  uuidRequiredEva UUID required,
  byteImageEva ImageBlob,
  byteImageRequiredEva ImageBlob required,
  byteImageMinbytesEva ImageBlob minbytes(0),
  byteImageMaxbytesEva ImageBlob maxbytes(10000),
  byteAnyEva AnyBlob,
  byteAnyRequiredEva AnyBlob required,
  byteAnyMinbytesEva AnyBlob minbytes(0),
  byteAnyMaxbytesEva AnyBlob maxbytes(10000),
  byteTextEva TextBlob,
  byteTextRequiredEva TextBlob required
}
entity FieldTestPaginationEntity {
  stringAlice String,
  stringRequiredAlice String required,
  stringMinlengthAlice String minlength(0),
  stringMaxlengthAlice String maxlength(20),
  stringPatternAlice String pattern(/^[a-zA-Z0-9]*$/),
  integerAlice Integer,
  integerRequiredAlice Integer required,
  integerMinAlice Integer min(0),
  integerMaxAlice Integer max(100),
  longAlice Long,
  longRequiredAlice Long required,
  longMinAlice Long min(0),
  longMaxAlice Long max(100),
  floatAlice Float,
  floatRequiredAlice Float required,
  floatMinAlice Float min(0),
  floatMaxAlice Float max(100),
  doubleRequiredAlice Double required,
  doubleMinAlice Double min(0),
  doubleMaxAlice Double max(100),
  bigDecimalRequiredAlice BigDecimal required,
  bigDecimalMinAlice BigDecimal min(0),
  bigDecimalMaxAlice BigDecimal max(100),
  localDateAlice LocalDate,
  localDateRequiredAlice LocalDate required,
  instantAlice Instant,
  instanteRequiredAlice Instant required,
  zonedDateTimeAlice ZonedDateTime,
  zonedDateTimeRequiredAlice ZonedDateTime required,
  durationAlice Duration,
  durationRequiredAlice Duration required,
  booleanAlice Boolean,
  booleanRequiredAlice Boolean required,
  enumAlice EnumFieldClass,
  enumRequiredAlice EnumRequiredFieldClass required,
  uuidAlice UUID,
  uuidRequiredAlice UUID required,
  byteImageAlice ImageBlob,
  byteImageRequiredAlice ImageBlob required,
  byteImageMinbytesAlice ImageBlob minbytes(0),
  byteImageMaxbytesAlice ImageBlob maxbytes(10000),
  byteAnyAlice AnyBlob,
  byteAnyRequiredAlice AnyBlob required,
  byteAnyMinbytesAlice AnyBlob minbytes(0),
  byteAnyMaxbytesAlice AnyBlob maxbytes(10000),
  byteTextAlice TextBlob,
  byteTextRequiredAlice TextBlob required
}
entity FieldTestServiceClassEntity {
  stringBob String,
  stringRequiredBob String required,
  stringMinlengthBob String minlength(0),
  stringMaxlengthBob String maxlength(20),
  stringPatternBob String pattern(/^[a-zA-Z0-9]*$/),
  integerBob Integer,
  integerRequiredBob Integer required,
  integerMinBob Integer min(0),
  integerMaxBob Integer max(100),
  longBob Long,
  longRequiredBob Long required,
  longMinBob Long min(0),
  longMaxBob Long max(100),
  floatBob Float,
  floatRequiredBob Float required,
  floatMinBob Float min(0),
  floatMaxBob Float max(100),
  doubleRequiredBob Double required,
  doubleMinBob Double min(0),
  doubleMaxBob Double max(100),
  bigDecimalRequiredBob BigDecimal required,
  bigDecimalMinBob BigDecimal min(0),
  bigDecimalMaxBob BigDecimal max(100),
  localDateBob LocalDate,
  localDateRequiredBob LocalDate required,
  instantBob Instant,
  instanteRequiredBob Instant required,
  zonedDateTimeBob ZonedDateTime,
  zonedDateTimeRequiredBob ZonedDateTime required,
  durationBob Duration,
  durationRequiredBob Duration required,
  booleanBob Boolean,
  booleanRequiredBob Boolean required,
  enumBob EnumFieldClass,
  enumRequiredBob EnumRequiredFieldClass required,
  uuidBob UUID,
  uuidRequiredBob UUID required,
  byteImageBob ImageBlob,
  byteImageRequiredBob ImageBlob required,
  byteImageMinbytesBob ImageBlob minbytes(0),
  byteImageMaxbytesBob ImageBlob maxbytes(10000),
  byteAnyBob AnyBlob,
  byteAnyRequiredBob AnyBlob required,
  byteAnyMinbytesBob AnyBlob minbytes(0),
  byteAnyMaxbytesBob AnyBlob maxbytes(10000),
  byteTextBob TextBlob,
  byteTextRequiredBob TextBlob required
}
entity FieldTestServiceImplEntity {
  stringMika String,
  stringRequiredMika String required,
  stringMinlengthMika String minlength(0),
  stringMaxlengthMika String maxlength(20),
  stringPatternMika String pattern(/^[a-zA-Z0-9]*$/),
  integerMika Integer,
  integerRequiredMika Integer required,
  integerMinMika Integer min(0),
  integerMaxMika Integer max(100),
  longMika Long,
  longRequiredMika Long required,
  longMinMika Long min(0),
  longMaxMika Long max(100),
  floatMika Float,
  floatRequiredMika Float required,
  floatMinMika Float min(0),
  floatMaxMika Float max(100),
  doubleRequiredMika Double required,
  doubleMinMika Double min(0),
  doubleMaxMika Double max(100),
  bigDecimalRequiredMika BigDecimal required,
  bigDecimalMinMika BigDecimal min(0),
  bigDecimalMaxMika BigDecimal max(100),
  localDateMika LocalDate,
  localDateRequiredMika LocalDate required,
  instantMika Instant,
  instanteRequiredMika Instant required,
  zonedDateTimeMika ZonedDateTime,
  zonedDateTimeRequiredMika ZonedDateTime required,
  durationMika Duration,
  durationRequiredMika Duration required,
  booleanMika Boolean,
  booleanRequiredMika Boolean required,
  enumMika EnumFieldClass,
  enumRequiredMika EnumRequiredFieldClass required,
  uuidMika UUID,
  uuidRequiredMika UUID required,
  byteImageMika ImageBlob,
  byteImageRequiredMika ImageBlob required,
  byteImageMinbytesMika ImageBlob minbytes(0),
  byteImageMaxbytesMika ImageBlob maxbytes(10000),
  byteAnyMika AnyBlob,
  byteAnyRequiredMika AnyBlob required,
  byteAnyMinbytesMika AnyBlob minbytes(0),
  byteAnyMaxbytesMika AnyBlob maxbytes(10000),
  byteTextMika TextBlob,
  byteTextRequiredMika TextBlob required
}
entity TestCustomTableName (test_custom_table_name_entity)
entity TestEntity
entity TestInfiniteScroll
entity TestMapstruct
entity TestPagination
entity TestServiceClass
entity TestServiceImpl
entity TestTwoRelationshipsSameEntity (test_multiple_rel)
entity TestManyRelPaginDTO (test_many_many_pagination_dto)
entity TestManyToMany
entity TestManyToOne
entity TestOneToOne
entity EntityWithDTO {
  emma String
}
entity EntityWithServiceClass {
  zoe String
}
entity EntityWithServiceImpl {
  clara String
}
entity EntityWithPagination {
  nathan String
}
entity EntityWithServiceClassAndPagination {
  enzo String
}
entity EntityWithServiceImplAndPagination {
  hugo String
}
entity EntityWithServiceClassAndDTO {
  lucas String
}
entity EntityWithServiceImplAndDTO {
  louis String
}
entity EntityWithPaginationAndDTO {
  lea String
}
entity EntityWithServiceClassPaginationAndDTO {
  lena String
}
entity EntityWithServiceImplPaginationAndDTO {
  theo String
}
entity Division {
  name String required unique,
  shortName String unique,
  numberOfPeople Long,
  divisionType DivisionType required,
  colorBackground String,
  colorText String
}
entity Place {
  name String required,
  numberOfSeats Long,
  shortName String,
  colorBackground String,
  colorText String,
  description TextBlob
}
entity SuperMegaLargeTestEntity
entity MapsIdParentEntityWithoutDTO (parent_entity_wo_dto) {
  name String
}
entity MapsIdChildEntityWithoutDTO (child_entity_wo_dto) {
  date Instant
}
entity MapsIdParentEntityWithDTO (maps_id_parent_entity_withdto) {
  name String
}
entity MapsIdChildEntityWithDTO (maps_id_child_entity_withdto) {
  date Instant
}
entity MapsIdUserProfileWithDTO (maps_id_user_profile_withdto) {
  dateOfBirth Instant
}
enum BankAccountType {
  CHECKING,
  SAVINGS,
  LOAN
}
enum EnumFieldClass {
  ENUM_VALUE_1,
  ENUM_VALUE_2,
  ENUM_VALUE_3
}
enum EnumRequiredFieldClass {
  ENUM_VALUE_1,
  ENUM_VALUE_2,
  ENUM_VALUE_3
}
enum DivisionType {
  SCHOOL,
  CLASS,
  SUBGROUP
}

relationship OneToOne {
  TestCustomTableName{userOneToOne(login)} to User,
  TestEntity{userOneToOne(login)} to User,
  TestInfiniteScroll{userOneToOne(login)} to User,
  TestMapstruct{userOneToOne(login)} to User,
  TestPagination{userOneToOne(login)} to User,
  TestServiceClass{userOneToOne(login)} to User,
  TestServiceImpl{userOneToOne(login)} to User,
  TestTwoRelationshipsSameEntity{userOne} to User,
  TestTwoRelationshipsSameEntity{userTwo} to User,
  TestOneToOne{testEntity} to TestEntity{testOneToOne},
  TestOneToOne{testMapstruct} to TestMapstruct{testOneToOne},
  TestOneToOne{testServiceClass} to TestServiceClass{testOneToOne},
  TestOneToOne{testServiceImpl} to TestServiceImpl{testOneToOne},
  TestOneToOne{testInfiniteScroll} to TestInfiniteScroll{testOneToOne},
  TestOneToOne{testPagination} to TestPagination{testOneToOne},
  TestOneToOne{testCustomTableName} to TestCustomTableName{testOneToOne},
  TestOneToOne{superMegaLargeTestEntity} to SuperMegaLargeTestEntity{superMegaLargeTestOneToOne},
  SuperMegaLargeTestEntity{superMegaLargeUserOneToOne(login)} to User,
  MapsIdChildEntityWithoutDTO{mapsIdParentEntityWithoutDTO} to MapsIdParentEntityWithoutDTO{mapsIdChildEntityWithoutDTO} with jpaDerivedIdentifier,
  MapsIdChildEntityWithDTO{mapsIdParentEntityWithDTO} to MapsIdParentEntityWithDTO{mapsIdChildEntityWithDTO} with jpaDerivedIdentifier,
  MapsIdUserProfileWithDTO{user(login)} to User with jpaDerivedIdentifier
}
relationship OneToMany {
  BankAccount{operation} to Operation{bankAccount(name)},
  TestEntity{testCustomTableName} to TestCustomTableName{testEntity required},
  SuperMegaLargeTestEntity{superMegaLargeTestCustomTableName} to TestCustomTableName{superMegaLargeTestEntity required},
  TestEntity{testManyToOne} to TestManyToOne{testEntity},
  TestMapstruct{testManyToOne} to TestManyToOne{testMapstruct},
  TestServiceClass{testManyToOne} to TestManyToOne{testServiceClass},
  TestServiceImpl{testManyToOne} to TestManyToOne{testServiceImpl},
  TestInfiniteScroll{testManyToOne} to TestManyToOne{testInfiniteScroll},
  TestPagination{testManyToOne} to TestManyToOne{testPagination},
  TestCustomTableName{testManyToOne} to TestManyToOne{testCustomTableName},
  SuperMegaLargeTestEntity{superMegaLargeTestManyToOne} to TestManyToOne{superMegaLargeTestEntity},
  Division{divisionsPlace} to Place{owner(name)}
}
relationship ManyToOne {
  BankAccount{user(login)} to User,
  TestCustomTableName{userOneToMany(login)} to User,
  TestEntity{userOneToMany(login) required} to User,
  TestInfiniteScroll{userOneToMany(login)} to User,
  TestMapstruct{userOneToMany(login)} to User,
  TestPagination{userOneToMany(login)} to User,
  TestServiceClass{userOneToMany(login)} to User,
  TestServiceImpl{userOneToMany(login)} to User,
  TestTwoRelationshipsSameEntity{firstRelationship} to TestEntity,
  TestTwoRelationshipsSameEntity{secondRelationship} to TestEntity,
  TestTwoRelationshipsSameEntity{firstUniqueRequiredRelation required} to Division,
  TestTwoRelationshipsSameEntity{secondUniqueRequiredRelation required} to Division,
  SuperMegaLargeTestEntity{superMegaLargeUserOneToMany(login) required} to User
}
relationship ManyToMany {
  Operation{label(labelName)} to Label{operation},
  TestCustomTableName{userManyToMany(login)} to User,
  TestEntity{userManyToMany(login)} to User,
  TestInfiniteScroll{userManyToMany(login)} to User,
  TestMapstruct{userManyToMany(login)} to User,
  TestPagination{userManyToMany(login)} to User,
  TestServiceClass{userManyToMany(login)} to User,
  TestServiceImpl{userManyToMany(login)} to User,
  TestManyRelPaginDTO{testMapstruct} to TestMapstruct{testManyRelPaginDTO},
  TestManyToMany{testEntity} to TestEntity{testManyToMany},
  TestManyToMany{testMapstruct} to TestMapstruct{testManyToMany},
  TestManyToMany{testServiceClass} to TestServiceClass{testManyToMany},
  TestManyToMany{testServiceImpl} to TestServiceImpl{testManyToMany},
  TestManyToMany{testInfiniteScroll} to TestInfiniteScroll{testManyToMany},
  TestManyToMany{testPagination} to TestPagination{testManyToMany},
  TestManyToMany{testCustomTableName} to TestCustomTableName{testManyToMany},
  TestManyToMany{superMegaLargeTestEntity} to SuperMegaLargeTestEntity{superMegaLargeTestManyToMany},
  Place{preferredDivision(name)} to Division{preferredPlace},
  SuperMegaLargeTestEntity{superMegaLargeUserManyToMany(login)} to User
}

dto BankAccount, FieldTestMapstructEntity, TestMapstruct, TestManyRelPaginDTO, EntityWithDTO, EntityWithServiceClassAndDTO, EntityWithServiceImplAndDTO, EntityWithPaginationAndDTO, EntityWithServiceClassPaginationAndDTO, EntityWithServiceImplPaginationAndDTO, MapsIdParentEntityWithDTO, MapsIdChildEntityWithDTO, MapsIdUserProfileWithDTO with mapstruct
service BankAccount, FieldTestServiceImplEntity, TestServiceImpl, TestManyRelPaginDTO, EntityWithServiceImpl, EntityWithServiceImplAndPagination, EntityWithServiceImplAndDTO, EntityWithServiceImplPaginationAndDTO, MapsIdParentEntityWithDTO, MapsIdChildEntityWithDTO, MapsIdUserProfileWithDTO with serviceImpl
service Label, FieldTestMapstructEntity, FieldTestServiceClassEntity, TestServiceClass, EntityWithServiceClass, EntityWithServiceClassAndPagination, EntityWithServiceClassAndDTO, EntityWithServiceClassPaginationAndDTO with serviceClass
angularSuffix BankAccount, TestTwoRelationshipsSameEntity, TestManyRelPaginDTO, TestManyToMany, TestManyToOne, TestOneToOne with mySuffix
angularSuffix TestEntity, SuperMegaLargeTestEntity with mySuffixAlt
filter BankAccount, FieldTestServiceClassEntity, TestEntity, TestServiceClass, TestServiceImpl, SuperMegaLargeTestEntity
clientRootFolder BankAccount, Label, Operation, Division, Place with test-root
paginate Label, FieldTestPaginationEntity, TestPagination, TestManyRelPaginDTO, EntityWithPagination, EntityWithServiceClassAndPagination, EntityWithServiceImplAndPagination, EntityWithPaginationAndDTO, EntityWithServiceClassPaginationAndDTO, EntityWithServiceImplPaginationAndDTO with pagination
paginate Operation, FieldTestInfiniteScrollEntity, TestInfiniteScroll with infinite-scroll
readOnly Label

Browsers and Operating System

openjdk version "1.8.0_232"
OpenJDK Runtime Environment Corretto-8.232.09.1 (build 1.8.0_232-b09)
OpenJDK 64-Bit Server VM Corretto-8.232.09.1 (build 25.232-b09, mixed mode)

git version 2.24.1

node: v12.13.1

npm: 6.12.1

yarn: 1.21.1

Docker version 19.03.5, build 633a0ea838

docker-compose version 1.25.0, build 0a186604

  • Checking this box is mandatory (this is just to show you read everything)
@pascalgrimaud pascalgrimaud added $$ bug-bounty $$ https://www.jhipster.tech/bug-bounties/ $100 https://www.jhipster.tech/bug-bounties/ labels Feb 2, 2020
@pascalgrimaud
Copy link
Member

adding a bounty as it's a bug

@qmonmert
Copy link
Contributor

qmonmert commented Feb 2, 2020

@vishal423 & @pascalgrimaud I work on this

@Falydoor
Copy link
Contributor

Falydoor commented Feb 2, 2020

I noticed it happens on the user management's page too:

image

@qmonmert
Copy link
Contributor

qmonmert commented Feb 2, 2020

@Falydoor ok but can you tell me your config ?

@Falydoor
Copy link
Contributor

Falydoor commented Feb 2, 2020

@ctamisier
Copy link
Contributor

As I was trying to fix the sort of users, I ended up refactoring and consequently fix the 2 api calls on users as well.
As it might not be what you had in mind on how to fix, I let you check this #11171 and eventually close it if a new PR is coming to fix it.

@qmonmert
Copy link
Contributor

qmonmert commented Feb 8, 2020

@ctamisier your PR seems 👍

@qmonmert
Copy link
Contributor

@vishal423 & @pascalgrimaud I think my PR #11224 is ok

pascalgrimaud added a commit that referenced this issue Feb 11, 2020
Fix issue #11222 : react in a few scenarios, the entity list page can invoke up to 4 calls to the backend API #11222
@qmonmert
Copy link
Contributor

@pascalgrimaud pascalgrimaud added this to the 6.7.1 milestone Feb 12, 2020
@vishal423
Copy link
Contributor Author

@pascalgrimaud, I have noticed another flow on same page (list view) making more than one backend call. Should we reopen this ticket?

@pascalgrimaud
Copy link
Member

I would prefer to open a new ticket and link to this one, as there were a bounty on this ticket. So it won't confuse people and we could add a new bounty if it deserves.

@vishal423
Copy link
Contributor Author

done. I think new issues could be due to changes made as part of this ticket. To limit further issues, it would be good to review generated code especially the useEffect hook code in the entity classes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: bug 🐛 $$ bug-bounty $$ https://www.jhipster.tech/bug-bounties/ theme: react $100 https://www.jhipster.tech/bug-bounties/
Projects
None yet
5 participants