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 bug where New Publication form for Chapter could have an ISBN pre-populated but greyed out #531

Merged
merged 3 commits into from
Jan 8, 2024

Conversation

rhigman
Copy link
Member

@rhigman rhigman commented Dec 21, 2023

Every time a user opens the New Publications form, it's pre-populated with the details of the last Publication that was saved. For Publications with work type Book Chapter, the ISBN field in the form is greyed out, because Book Chapter Publications can't have ISBNs. This can result in a scenario where the form is populated with a non-permitted but non-removable ISBN.

image

image

@rhigman rhigman requested a review from ja573 December 21, 2023 17:12
@ja573
Copy link
Member

ja573 commented Jan 8, 2024

I'd say the bug here is not that the chapter has an ISBN prepopulated, but that there's prepopulated data to begin with. The logic to prepopulate data is just meant to be used for editting, so we should just clear self.publication on create

@rhigman
Copy link
Member Author

rhigman commented Jan 8, 2024

I'd say the bug here is not that the chapter has an ISBN prepopulated, but that there's prepopulated data to begin with. The logic to prepopulate data is just meant to be used for editting, so we should just clear self.publication on create

I think we may have discussed this at the time of implementation, and decided that the prepopulated data could also be useful for users adding several similar New Publications in one go. (See 8c5027e: the original logic was to clear self.publication on create, which changed in b267a45 / cbeb04d.)

Happy to change it back now if we no longer think this is the case, though.

@ja573
Copy link
Member

ja573 commented Jan 8, 2024

I'd say the bug here is not that the chapter has an ISBN prepopulated, but that there's prepopulated data to begin with. The logic to prepopulate data is just meant to be used for editting, so we should just clear self.publication on create

I think we may have discussed this at the time of implementation, and decided that the prepopulated data could also be useful for users adding several similar New Publications in one go. (See 8c5027e: the original logic was to clear self.publication on create, which changed in b267a45 / cbeb04d.)

Happy to change it back now if we no longer think this is the case, though.

Oh, I see. I think it's more annoying (and error prone) having to delete the ISBN each time, so let's just leave it blank

@rhigman rhigman merged commit 28b3445 into develop Jan 8, 2024
11 checks passed
@rhigman rhigman deleted the feature/fix_chapter_isbns branch January 8, 2024 12:58
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.

None yet

2 participants