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

Selecting Change Reviewers before accepting the revision causes the testing tag to be added in the reviewers section #6

Closed
Standard8 opened this issue Oct 9, 2020 · 2 comments

Comments

@Standard8
Copy link

STR

  1. Enter a phabricator revision
  2. Select Change Reviewers (as you want to approve, but also add someone else)
  3. Select Accept Revision

Expected Results

  • The testing policy tags attempt to be added to the "Change Project Tags" field.

Actual Results

  • The testing policy tags attempt to be added to the "Change Reviewers" field.
@nchevobbe
Copy link
Owner

Thanks for the report, I do reproduce.
The issue is that there's no explicit attribute that distinguish the reviewers from the project tags input :/
I might check the label text, but that's a bit ugly, I'll try to see if I can do better

@nchevobbe
Copy link
Owner

this was fixed in 1.4.0 , which is now on AMO

nchevobbe added a commit that referenced this issue Jan 4, 2021
Fix #6

When accepting the revision, we were doing a simple query
to retrieve the project id input and prefill it with the
testing tag prefix.
But it might happen that the user have other inputs displayed (e.g. Reviewers),
and the selector we're using is the same, so we'd fill the wrong input.

Unfortunately, there's no meaningful attributes that could only target the
project tags input.
Luckily, there's a <data> element on the page that has some data about project
ids, and more specifically, the markup that will be used to render the input,
where what seems to be a unique data-meta id is used.
So here, at startup we retrieve this id, and when accepting the revision, we
check the element with this data-meta attribute, and retrieve the sibling
input.
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

No branches or pull requests

2 participants