Page MenuHomePhabricator

Can't create milestone
Closed, DuplicatePublic

Description

If I try to create a milestone in a project i always get
The selected view policy excludes you. Choose a view policy which allows you to view the object.

But it is not possible to select view policies in milestones. I've also checked the default values of the form and they are fine (my user has access to these settings).

Versions:
phabricator 130e1d1f68a4dc4c41559be11971301cbb656317 (Sun, Mar 20)
arcanist 3d7ac867f53892b8210339bbb0c5fd91e0e36d78 (Tue, Mar 15)
phutil b4f38af384807b7dcd1e3d1a96e9e9069e4d6964 (Fri, Mar 18)

Event Timeline

I can't reproduce this. Here's what I did:

  • Found a project.
  • Clicked "Subprojects".
  • Clicked "Create Milestone".
  • Filled in the details, clicked submit button.

This created a milestone:

Do you have any idea about what I did differently?

Yeah i did basically the same. What are the permissions of your project?

chad added a subscriber: chad.Mar 24 2016, 2:07 PM

Generally easier if you just tell us what your settings are that reproduce the issue, rather than us try to reverse engineer all the choices.

I've posted a screenshot of my settings or do you need anything else?

chad added a comment.Mar 24 2016, 2:09 PM

I don't know the relation of your account to those policies. Are you a member of those groups?

Yes I'm member of all those groups as described above. I'm also an "Admin"

chad added a comment.EditedMar 24 2016, 2:17 PM

No luck, I tried the same settings you just posted, an admin as edit policy, also in the group view and join policy. I couldn't reproduce your screenshots.

Ok, then I'll investigate further and give feedback as soon as i've found something

sascha-egerer added a comment.EditedMar 24 2016, 9:52 PM

Ok i found the reason for the problem.
If you set ApplicationsProjectsEdit PoliciesDefault View Policy to Project Memebers i does not work. You can still create normal projects and subprojects but you can't create milestones. I think that is because milestones do not have members but the permissions are evaluated against the "project members".

So PhabricatorApplicationTransactionEditor::validatePolicyTransaction fails...

Can you reproduce and confirm that?

chad added a comment.May 2 2016, 7:15 PM

I'm going to guess this is the same as T10779

I know this was linked against my question, but I wanted to check and see if it is the same thing...

@sascha-egerer, did the project in question have at least one Subproject (differentiating from Milestone, of course...they're two different things.)

@CodeMouse92 yes the project has a subproject. But changing the policies as described above works around that issue.

CodeMouse92 added a comment.EditedMay 24 2016, 3:11 PM

@sascha-egerer that would seem to be the main factor, and the reason this couldn't be duplicated initially. It isn't all milestones - it is specifically milestones for projects that have subprojects.

You had half the problem figured out. Adding a subproject migrates project membership to that subproject, and then the main project's membership is a combination of all of the subproject memberships.

PhabricatorApplicationTransactionEditor::validatePolicyTransaction fails if...

  1. The parent's members list is based solely on its children's members lists. (It has Subprojects.)
  1. Permissions are set to Project Membership.

So, in short, yes, this is indeed the same thing as with my bug.