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

Feature/dev 70 multiple entry authors #12380

Merged
merged 48 commits into from
Jan 2, 2024

Conversation

i-just
Copy link
Contributor

@i-just i-just commented Nov 24, 2022

Description

  • created new entries_authors table.
  • added migration to create new table and migrate content from entries to entries_authors table
  • added table to the Install migration
  • authorId removed from entries table
  • you can specify max authors per section
  • Entry::getAuthor() behaves the same as in v4, but returns the one author with lowest sortOrder for given entry
  • new Entry::getAuthors() returns all authors ordered by sortOrder
  • edit entry template accepts multiple authors (with the ability to sort); minimum 1 author required (defaults to currently logged in user), maximum the number of authors defined for the section
  • you can query entries by authorId, author (as before) and by authorsIds and authors (new)
  • querying by authorId (e.g. ->authorId(1)) will return all entries where at least one of the authors matches the provided ID
  • querying by authorsIds (e.g. ->authorsIds([1, 2])) will return all entries authored by exactly those 2 authors; (in other words, the parameters are joined by and)

Related issues

DEV-70

@linear
Copy link

linear bot commented Nov 24, 2022

DEV-70 Multi-author entries

Sections or entry types should be able to choose the maximum number of authors that can be assigned to entries.

I think we would still want to keep Entry::etAuthor() which would return the “primary” author (whoever is listed first), plus add a new getAuthors() method for returning all of them.

#8134

@i-just i-just marked this pull request as ready for review October 18, 2023 13:21
@i-just i-just requested a review from brandonkelly October 18, 2023 13:21
@brandonkelly brandonkelly merged commit 52b5613 into 5.0 Jan 2, 2024
6 checks passed
@brandonkelly brandonkelly deleted the feature/dev-70-multiple-entry-authors branch January 2, 2024 05:39
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.

2 participants