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

Fix #750 #799

Merged
merged 1 commit into from Apr 1, 2023
Merged

Fix #750 #799

merged 1 commit into from Apr 1, 2023

Conversation

ghost
Copy link

@ghost ghost commented Mar 30, 2023

Hi @mraible
I have tested the fix with the bug-tracker.jh modified (I added in Attachment entity two Blob and two ImageBlob fields):

entity Project {
  name String
}

entity Label {
  label String required minlength(3)
}

application {
  config {
    prodDatabaseType postgresql,
  }
  entities *
}

entity Ticket {
  title String required
  description String
  dueDate LocalDate
  date ZonedDateTime
  status Status
  type Type
  priority Priority
}

entity Attachment {
  name String required minlength(3)
  file1 Blob,
  file2 Blob,
  imageFile1 ImageBlob,
  imageFile2 ImageBlob
}

relationship ManyToMany {
  Ticket{label(label)} to Label{ticket}
}

relationship ManyToOne {
  Ticket{project(name)} to Project
  Ticket{assignedTo(login)} to User
  Ticket{reportedBy(login)} to User
  Comment{login} to User
}

relationship OneToMany {
  Comment{parent} to Comment{child}
  Ticket to Attachment 
}

enum Status {
  OPEN("Open")
  WAITING_FOR_RESPONSE("Waiting for Customer Response")
  CLOSED("Closed")
  DUPLICATE("Duplicate")
  IN_PROGRESS("In Progress")
  REOPENED("Reopened")
  CANNOT_REPRODUCE("Cannot Reproduce")
  SOLVED("Solved")
  WONT_IMPLEMENT("Won't Implement")
  VERIFIED("Verified")
  
}

enum Type {
  BUG("Bug"),
  FEATURE("Feature")
}

enum Priority {
  HIGHEST("Highest")
  HIGHER("Higher")
  HIGH("High")
  NORMAL("Normal")
  LOW("Low")
  LOWER("Lower")
  LOWERST("Lowest")
}

entity Comment {
  date ZonedDateTime
  text String
}

paginate Ticket with pagination

I have the following considerations for the bug commented in this #750 issue:

  1. For Blob field @ViewChild fileInput annotation is not declared in the -update.ts file. So I have deleted #fileInput attribute in input html related tag. Besides the input text uses a setFileData method.
  2. The getPicture() method is used for ImageBlob field, that calls camera api without this.fileInput.nativeElement.click() method (fileInput was for Blob field and it isn't in related ts file).
  3. I have modified -update.ts template for a invalid selection in case that there are Blob and ImageBlob fields in the same entity. There was a if-else statement that not includes this situation.
    Pleas give me a feedback as you can.
    Thanks for the attention and your time.

Copy link
Collaborator

@mraible mraible left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great! Awesome job. It's cool that even my computer allowed me to take and upload a photo.

@mraible mraible merged commit f9b4345 into jhipster:main Apr 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant