•  
     
    story #12189 prevent field modification according to state
Summary
tracker admin
prevent field modification according to state

I can ensure that my artifact is not modified when workflow is used to deal with a normalized process

Overview

The intend of this feature is to progressively settle fields during artifact life in case of usage of worklow to mark maturity stages (like ISO/CMM processes often do). With this in mind, when moving from one stage to another, a bunch of fields that were "under elaboration" became frozen.

It's still possible to un-freeze those fields if the workflow allows some back-tracker (ie. a tracker admin could temporarly allows a transition to make edit possible).

With this feature it would be possible to configure a worklow so an artifact would be entirely "read-only" when "Closed" (except for follow-up comments).

This story depends on story #12187 for new workflow configuration panel.

See live mockup: https://s.codepen.io/enalean/debug/dace752a350bcecdad1003e505bc9992

Functional overview

Tracker administrator point of view, configuration

The configuration of frozen fields is made in workflow transition settings. A new post-action is proposed "Freeze fields" with a multi-select box like in tracker field administration (with fields grouped by containers). All the fields selected won't be modifiable (even by a tracker, project or site administrator).

In order to keep a clear UI and not make it confusing, this post-action can only be added once per state. After adding it once, when you try to add this type of post-action again, then the selectbox for post-action type will show a disabled option.

Edge cases:

  • Field dependencies: if 2 fields have dependencies they must be configured to be either editable or frozen at same time.
  • Triggers: Triggers are defined by tracker admin and can modify a "frozen" field on the behalf of the user.
  • Other post-actions. If the transaction set a value to a field (for instance set "0" as remaining_effort when status is Done) and the field is set to frozen, the post action valuation is done (that is to say: remaining_effort is set to 0 and no longer modifiable).
  • Rules: Rules applies regardless of the frozen field. A tracker admin can make a dead-end transaction by having a global rule that cannot be satisfied due to frozen field.

End user point of view, usage

At a given state, all the frozen fields the user can see are read only (as if they were not updatable as per permissions).

Limitations

There are some limits with the interaction of workflow post action with some Tuleap features:

  • On scrum cardwall. If the workflow defines that at some states either "Remaining effort" or "Assigned to" are no longer modifiable, it will not be taken into account on the cardwall. To say it differently, in this situation, the data won't be updated on the backend (data are safe) but the error will not be shown to the end user. It would require a major rewrite of the current scrum cardwall (out of the scope of this dev) and it's very unlikely that a team would actually set this up.
  • On cardwall renderer of a tracker. If the workflow forbids modification of state at some points of the workflow, the following drag'n drop will be possible but will trigger an error with a opening modal of the artifact to modify the values so the constraints are met.

Technical overview

  • Configuration must be exported/imported with tracker XML format
  • Configuration must be duplicated at tracker / project creation.
  • On the configuration screen fields that are already readonly (burndown, last_update_date, etc) or containers (columns, etc) are not listed to limit the amount of elements to pick-up.

For REST and the angular Artifact modal

The REST routes need to be updated. We initially thought to use the permissions, but those live on the tracker and not on the artifact. The tracker has no knowledge of the particular states of artifacts. We must add the information on the artifact or more precisely, on the artifact's fields.
Here is the proposal:

{
  "field_id": 8506,
  "type": "float",
  "label": "Effort",
  "value": 126
}

Becomes

{
  "field_id": 8506,
  "type": "float",
  "label": "Effort",
  "value": 126,
  "workflow_state": {
    "can_user_update": false
  }
}

The artifact modal will need to be updated to take into account that fields with "can_user_update" === false should not be editable.
"workflow_state" can be reused in story #12188 to also support the "hide" information that will tell the REST consumer that this field is supposed to be hidden.

Empty
external.Kevin.LAVILLE@jtekt.eu, Nouha Terzi (terzino), Denis PILAT (denis_pilat), duffey maxime (duffeym)
Status
On going
Development
Empty
Empty
Details
#12189
Manuel Vacelet (vaceletm)
2019-06-01 12:49
2018-08-27 17:09
3494

References

List of items referenced by or referencing this item.

Git commit

Follow-ups

  • User avatar
    gerrit #15078 integrated into Tuleap 11.2.99.7
  • User avatar
    gerrit #15058 integrated into Tuleap 11.2.99.5
  • User avatar
    gerrit #15056 integrated into Tuleap 11.2.99.4
  • User avatar
    gerrit #15053 integrated into Tuleap 11.2.99.3
  • User avatar
    gerrit #15049 integrated into Tuleap 11.1.99.143
  • User avatar
    gerrit #15047 integrated into Tuleap 11.1.99.142
  • User avatar
    gerrit #15040 integrated into Tuleap 11.1.99.139
  • User avatar
    gerrit #15041 integrated into Tuleap 11.1.99.126
  • User avatar
    gerrit #15033 integrated into Tuleap 11.1.99.118
  • User avatar
    gerrit #15011 integrated into Tuleap 11.1.99.113
  • User avatar
    gerrit #15008 integrated into Tuleap 11.1.99.103.
  • User avatar
    gerrit #14973 integrated into Tuleap 11.1.99.69
  • User avatar
    gerrit #14939 integrated into Tuleap 11.1.99.43
  • User avatar
    gerrit #14937 integrated into Tuleap 11.1.99.39
  • User avatar
    gerrit #14929 integrated into Tuleap 11.1.99.34
  • User avatar
    gerrit #14931 integrated into Tuleap 11.1.99.33
  • User avatar
    gerrit #14927 integrated into Tuleap 11.1.99.28
  • User avatar
    gerrit #14917 integrated into Tuleap 11.1.99.23
  • User avatar
    gerrit #14909 integrated into Tuleap 11.1.99.20.
  • User avatar
    gerrit #14901 integrated into Tuleap 11.1.99.14.
  • User avatar
    gerrit #14889 integrated into Tuleap 11.1.99.10.
  • User avatar
    gerrit #14883 integrated into Tuleap 11.1.99.5.
  • User avatar
    gerrit #14849 and gerrit #14850 integrated into Tuleap 11.1.99.2.
  • User avatar
    gerrit #14837 integrated into Tuleap 11.0.99.126
  • User avatar
    gerrit #14833 integrated into TTM repo.
  • User avatar
    gerrit #14812 and gerrit #14813 integrated into Tuleap 11.0.99.117.
  • User avatar

    gerrit #14804 integrated into TTM

  • User avatar
    gerrit #14792 integrated into TestManagement Repository
  • User avatar
    gerrit #14563 integrated into Tuleap 11.0.99.60.
  • User avatar
    gerrit #14551 integrated into Tuleap 10.11.99.187
  • User avatar
    gerrit #14547 integrated into Tuleap 10.11.99.181
  • User avatar
    gerrit #14524 integrated into Tuleap 10.11.99.173
  • User avatar
    gerrit #14525 integrated into Tuleap 10.11.99.169.
  • User avatar
    gerrit #14521 integrated into Tuleap 10.11.99.168.
  • User avatar
    • Acceptance criteria
  • User avatar
    gerrit #14495 integrated into Tuleap 10.11.99.166
  • User avatar
    Limitations sounds fair to me
  • User avatar
    • Acceptance criteria
    • CC list Jordan BACHELET (jordan_bachelet_jtekt) removed external.Kevin.LAVILLE@jtekt.eu, Denis PILAT (denis_pilat), Nouha Terzi (terzino) added
  • User avatar
    gerrit #14440 integrated into Tuleap 10.11.99.157
  • User avatar
    gerrit #14428 integrated into Tuleap 10.11.99.137
  • User avatar
    gerrit #14407 integrated into Tuleap 10.11.99.125
  • User avatar
    gerrit #14337 integrated into Tuleap 10.11.99.66.
  • User avatar
    gerrit #14301 integrated into Tuleap 10.11.99.55.
  • User avatar
    The new post-action can only be added once

    • Acceptance criteria
  • User avatar
    Add live mockup link

    • Acceptance criteria
  • User avatar
    gerrit #13856 integrated into Tuleap 10.10.99.10
  • User avatar
    gerrit #13866 integrated into Tuleap 10.9.99.215
  • User avatar
    gerrit #13824 integrated into Tuleap 10.9.99.191
  • User avatar
    gerrit #13793 integrated into Tuleap 10.9.99.173
  • User avatar
    gerrit #13784 integrated into Tuleap 10.9.99.155
  • User avatar
    gerrit #13766 integrated into Tuleap 10.9.99.139
  • User avatar
    gerrit #13720 integrated into Tuleap 10.9.99.122
  • User avatar
    gerrit #13710 integrated into Tuleap 10.9.99.98
  • User avatar
    • Status changed from To be done to On going
  • User avatar

    Update after team review


    • Acceptance criteria
    • CC list set to Jordan BACHELET (jordan_bachelet_jtekt), duffey maxime (duffeym)
  • User avatar
    • Acceptance criteria
  • User avatar
    • Acceptance criteria
  • User avatar
    • So that
    • Acceptance criteria