Page MenuHomePhabricator

Can't create milestone
Closed, DuplicatePublic

Assigned To
Authored By
Mar 24 2016, 11:39 AM
Referenced Files
F1188896: 2.png
Mar 24 2016, 1:36 PM
F1188895: 1.png
Mar 24 2016, 1:36 PM
F1188771: Screen Shot 2016-03-24 at 4.44.36 AM.png
Mar 24 2016, 11:45 AM


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).

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:

Screen Shot 2016-03-24 at 4.44.36 AM.png (1×1 px, 182 KB)

Do you have any idea about what I did differently?

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

1.png (559×634 px, 105 KB)

2.png (624×781 px, 117 KB)

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?

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"

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

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?

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.

@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.