Page MenuHomePhabricator

Allow EditEngine forms to be marked as "edit" forms
ClosedPublic

Authored by epriestley on Dec 8 2015, 1:21 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 10, 12:22 AM
Unknown Object (File)
Sun, Nov 10, 12:18 AM
Unknown Object (File)
Sat, Nov 9, 10:50 PM
Unknown Object (File)
Sat, Nov 9, 10:17 PM
Unknown Object (File)
Tue, Oct 22, 4:08 PM
Unknown Object (File)
Oct 18 2024, 4:41 AM
Unknown Object (File)
Oct 17 2024, 2:42 PM
Unknown Object (File)
Oct 16 2024, 9:44 PM
Subscribers
None

Details

Summary

Ref T9132. Ref T9908. This attempts to move us forward on answering this question:

Which form gets used when a user clicks "Edit Task"?

One answer is "the same form that was used to create the task". There are several problems with that:

  • The form might not exist anymore.
  • The user might not have permission to see it.
  • Some of the fields might be hidden, essentially preventing them from being edited.
  • We have to store the value somewhere and old tasks won't have a value.
  • Any instructions on the form probably don't apply to edits.

One answer is "force the default, full form". That's not as problematic, but it means we have no ability to create limited access users who see fewer fields.

The answer in this diff is:

  • Forms can be marked as "edit forms".
  • We take the user to the first edit form they have permission to see, from a master list.

This allows you to create several forms like:

  • Advanced Edit Form (say, all fields -- visible to administrators).
  • Basic Edit Form (say, no policies -- visible to trusted users).
  • Noob Edit Form (say, no policies, priorities, or status -- visible to everyone).

Then you can give everyone access to "noob", some people access to "basic", and a few people access to "advanced".

This might only be part of the answer. In particular, you can still use any edit form you can see, so we could do these things in the future:

  • Give you an option to switch to a different form if you want.
  • Save the form the task was created with, and use that form by default.

If we do pursue those, we can fall back to this behavior if there's a problem with them (e.g., original form doesn't exist or wasn't recorded).

There's also no "reorder" UI yet, that'll be coming in the next diff.

I'm also going to try to probably make the "create" and "edit" stuff a little more consistent / less weird in a bit.

Test Plan

Marked various forms as edit forms or not edit forms, made edits, hit permissions errors, etc.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Allow EditEngine forms to be marked as "edit" forms.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
chad edited edge metadata.
This revision is now accepted and ready to land.Dec 8 2015, 3:29 AM
This revision was automatically updated to reflect the committed changes.