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

AP-5647: Update proceeding captions #7578

Merged
merged 1 commit into from
Jan 15, 2025
Merged

Conversation

colinbruce
Copy link
Contributor

What

Link to story

Switch from proceedings.last to proceedings.order(:created_at).last

Because we use GUIDs as the id, there is no value in a plain .last call as it orders by GUID text. Adding the order allows us to get the most recently created proceeding, which is what is expected, without having to make the URLs and routing more complex by adding specific proceeding IDs into the routes.

This also matches the existing use in the ProceedingIssueStatusesController

Checklist

Before you ask people to review this PR:

  • Tests and rubocop should be passing: bundle exec rake
  • Github should not be reporting conflicts; you should have recently run git rebase main.
  • The standards in the Git Workflow document on Confluence should be followed
  • There should be no unnecessary whitespace changes. These make diffs harder to read and conflicts more likely.
  • The PR description should say what you changed and why, with a link to the JIRA story.
  • You should have looked at the diff against main and ensured that nothing unexpected is included in your changes.
  • You should have checked that the commit messages say why the change was made.

Swicth from proceedings.last to proceedings.order(:created_at).last

Because we use GUIDs as the id, there is no value in a plain .last
call as it orders by GUID text.  Adding the order allows us to get
the most recently created proceeding, which is what is expected,
without having to make the URLs and routing more complex by adding
specific proceeding IDs into the routes.

This also matches the existing use in the ProceedingIssueStatusesController
@colinbruce colinbruce marked this pull request as ready for review January 14, 2025 09:48
@colinbruce colinbruce requested a review from a team as a code owner January 14, 2025 09:48
@colinbruce colinbruce added the ready for review Please review label Jan 14, 2025
Copy link
Contributor

@agoldstone93 agoldstone93 left a comment

Choose a reason for hiding this comment

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

This looks like an improvement. Happy to approve. I'm wondering if there's any weirdness when you add and delete proceedings but fingers crossed if there is, it'll come out in UAT

@colinbruce
Copy link
Contributor Author

This looks like an improvement. Happy to approve. I'm wondering if there's any weirdness when you add and delete proceedings but fingers crossed if there is, it'll come out in UAT

I think it should be okay, because it should always be for the most recently added proceeding, i.e. I have just added X - now ask the question but, as you say, the proof will be in the UAT! 🙂

@colinbruce colinbruce merged commit 42451a0 into main Jan 15, 2025
16 checks passed
@colinbruce colinbruce deleted the ap-5647/proceeding_name_bug branch January 15, 2025 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for review Please review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants