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

AO3-6587 Allow # as initial character in Ticket ID Field when editing a profile or pseud #4991

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

scottsds
Copy link
Member

Issue

https://otwarchive.atlassian.net/browse/AO3-6587

Purpose

This pull request will allow AO3 Support staffers to copy/paste Ticket ID numbers from their internal tools. This copied data often includes an "#" character, which staffers have to manually erase.

Previously, a live validation check would prevent staffers from hitting the "Update" button. Now, live validation is removed and the initial "#" is automagically stripped from the copied Ticket ID before validation.

Validation will allow an "#" in the first character position. If an "#" or any other character is in any other position, validation will fail.

Testing Instructions

Automated tests were updated to check for the above validation conditions, they can be manually checked as follows:

Instructions for Passing Validation

  1. Copy the ticket ID from the ticketing platform and note that it comes with an "#" prefix.
  2. Log in to the Archive as PAC admin or superadmin.
  3. Edit a user profile (https://test.archiveofourown.org/users/USERNAME/edit) OR pseud (https://test.archiveofourown.org/users/USERNAME/pseuds/PSEUDNAME.
  4. Paste the ticket ID with (or without) the "#" prefix.
  5. Click 'Update'.
  6. Be joyous that the update happens without error.

Instructions for Failing Validation

  1. Copy the ticket ID from the ticketing platform and note that it comes with an "#" prefix.
  2. Log in to the Archive as PAC admin or superadmin.
  3. Edit a user profile (https://test.archiveofourown.org/users/USERNAME/edit) OR pseud (https://test.archiveofourown.org/users/USERNAME/pseuds/PSEUDNAME.
  4. Paste the ticket ID, change initial # to any other character, or add an "#" or any other character to any other position.
  5. Click 'Update'.
  6. Validation fails.

References

Are there other relevant issues/pull requests/mailing list discussions?
https://otwarchive.atlassian.net/browse/AO3-6156
https://otwarchive.atlassian.net/browse/AO3-4595

Copy link
Contributor

@Bilka2 Bilka2 left a comment

Choose a reason for hiding this comment

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

The code looks good, but there are some things to improve for i18n.

app/views/pseuds/_pseuds_form.html.erb Show resolved Hide resolved
app/models/concerns/justifiable.rb Outdated Show resolved Hide resolved
Copy link
Contributor

@Bilka2 Bilka2 left a comment

Choose a reason for hiding this comment

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

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants