•  
     
    story #9090 have computed fields compatible with artifact links v2
Summary
Empty
have computed fields compatible with artifact links v2

A computed field can have a manually set value because we can define that:

Story A is decomposed in Story B & Tasks C. Then in Story A the effort should be computed while in Task C and Story B it should be manually set.

This is an evolution of existing Computed field:

  • By default, computed field automate computation of the value. Users with write access on the field can disable this autocomputation and set a value (see http://codepen.io/bdauton/pen/pyZvwp).
  • When a value is set, the value is recorded in the history as a change (eg. Given the auto computed value is 9 And I force the value to be "5", then the history will show "Remaining effort: computed => 5").
  • User can switch from set value back to automated computation. Then the history will show "Remaining effort 5 => automated".
  • Like current computed field, when the value is computed, no history of change is show / recorded.
  • When the value is manualy set, the automated computation is still show as an info (see http://codepen.io/bdauton/pen/pyZvwp).

How value is computed:

  • The computation takes into account all linked artifacts recursively (it's not attached to a given nature).
  • The target field is not configurable. If the Computed field is named "remaining_effort", it will auto sum all the values set in "remaining_effort" fields in all linked artifact, recursively
  • If a manual values is setted, the calcul will takes its value, even if the artifact has children
  • Permissions are not taken into account. If a user see artifact A linked to B & C. Even if user cannot access B or C, the value in computed field A will sum the values from B & C.

Transition & deployement (deprecation)

  • This is an evolution of "Computed field" with "fast compute" option.
  • For all computed fields that already use "fast compute" and that have the same field name and "target field", they will benefit of the new feature seamlessly (the "fast compute" option will disappear and the "target field" will also disappear)
  • For all computed fields that don't use "fast compute" yet, the option will be renamed to "Updatable computed field" with a complete information of the changes (see How value is computed)
  • For all computed fields that use "fast compute" and do not have the same field name and "target field", the "Updatable computed field" button will be disabled until the field name is equal to the "target field"
  • Tracker administrators will be invited to update their trackers configuration
    • With a permanent warning in tracker administration.
    • With a recurring message in all tracker service (ie a warining that can be discarded but that come back on regular basis until the configuration is fixed)
    • With a message in tracker field service when target field is different from field name
  • Site administrator will have a "deprecation monitoring panel" to follow the projects/trackers that need to be updated.
  • The legacy Computed fields will be gone by December 31st 2016.

REST API

  • new parameters will be introduce to do it:
     {
         "field_id": 1369,
         "type": "string",
         "label": "Title",
         "is_autocomputed": true|false,
         "manual_value": "4"|null
         "value": "25"
    },

For PUT/POST, if the state is autocomputed and manual value is set, an error is thrown.

Development warnings & notes:

  • XML import changest
  • XML import export of structure
  • REST API (changeset & structure)
  • Update of modals (v1..3)
  • CSV import: no update when the field is in "automated" mode
  • Take care of performances with large data set.
  • Take care of impact on long burndown (180 days).
Thomas Gerbet (tgerbet), Marie Ange Garnier (marieange)
Status
Empty
Done
Development
  • [ ] Does it involves User Interface? 
  • [ ] Are there any mockups?
  • [ ] Are permissions checked?
  • [ ] Does it need Javascript development?
  • [ ] Does it need a forge upgrade bucket?
  • [ ] Does it need to execute things in system events?
  • [ ] Does it impact project creation (templates)?
  • [ ] Is it exploratory?
Empty
Details
#9090
Manuel Vacelet (vaceletm)
2016-07-27 14:59
2016-04-20 15:21
9459

References
Referencing story #9090

Git commit

tuleap/tuleap/stable

Fix fatal error on AgileDashboard 7bfefc62eb
Mask option for fast compute trackers 13d6f16132
Add a "deprecation monitoring panel" in tracker administration 8e9a5ec3ea
Replace Fast compute option with an Upgrade button 233d713f19
Message for tracker administors 1c8a8b0053
Hide target field name in Computed fields admin 0e1dec1d2a
Warn when target field is different from field name 2176776039
Enable computed field edition db88c6a5dd
Do not display warning messages about deprecation to other people than administrators. 6cfb6d8ae4
Forgeupgrade correction 4f062336b9
When a computed field is updated, save history in changesets d868203fab
Update computed values in mail notifications 3af26594d2
Enable computed fields to manage float values f28cdb1532
Add tests for changeset diff for computed values a40847927e
Update field popup 1d90d368b3
CSV import and report renderer 60ef185bd0
Add a warning to indicates that after migration fields kept their original permissions 0cf009ed7b
The REST API can manipulate a computed field 661dcbcc7c
Change field display in admin panel c45e4d0168
New computed fields calculation 284f20050d
SOAP API is compatible with the new computed fields. 838df821e4
You can switch to autocompute even when the current manual value of the computed field is 0 5f31a0befd
Modal V1 add computed field on submit new artifact 02386a04fe
Computation field calcul correction 342f41f5b4
It is possible to edit a computed field while doing a mass change 42960097e6
Disable migration and edition of computed fields v2 f330d309ef
Re-enable migration and edition of computed fields v2 e10c771eda
Computed field in modal V1 broken 2d6e1dd4d3
You should be able to back to an autocomputed value, even if manual value is 0 2c4314d80a
When a computed field isn't migrated, it is still a read-only field 1089e70ee1
Correct failed tests 1316c7a4db
A non migrated field shouldn't be updatable e4510b7108
When you have a manual value, you should see the correct autocomputed value in field edition 978d5d9e4b
Fix REST representation when manual value is 0 84f8651404
Import/export XML f564ac5aed
Give a more accurate warning for deprecated fields fa5c8f7f6c
Fix wrong computed calculation d235ee2d7f
Update artifact-modal to use new computed fields 9170f0643b
Fix computation calculation, error when you mix int and computed value on the same node a16398edf9
REST test for computed fields 7516bdd539
Modal V2 7a68cfacc4
Fix leaking css styles 9007e4d043
Error on permission - If a computed field isn't submitable it shouldn't be displayed in modals bd5f3b6bab
Enables test rest to load project in plugins d6ddba5e80
Modal for adding task and adding new item 8b438b82b0
Git project import should use XML import 67a431df75
Fix creation of children in cardwall 46039f5323
Modal V3 - Route REST doesn't retrieve the correct computed value 106ba95ae3
REST Test computed V2 f3d0adc0a5
Update REST test 7e97b8e420
Update artifact-modal to use new computed fields 7027ce56c4

Follow-ups

User avatar
Thomas Gerbet (tgerbet)2016-06-16 16:17
gerrit #5940 integrated into Tuleap 8.15.99.77.

  • Acceptance criteria
    Something went wrong, the follow up content couldn't be loaded
    Only formatting have been changed, you should switch to markup to see the changes
  • CC list set to Marie Ange Garnier (marieange), Thomas Gerbet (tgerbet)
User avatar
  • Acceptance criteria
    Something went wrong, the follow up content couldn't be loaded
    Only formatting have been changed, you should switch to markup to see the changes
User avatar
Thomas Gerbet (tgerbet)2016-06-14 16:17
  • Acceptance criteria
    Something went wrong, the follow up content couldn't be loaded
    Only formatting have been changed, you should switch to markup to see the changes
User avatar
  • Acceptance criteria
    Something went wrong, the follow up content couldn't be loaded
    Only formatting have been changed, you should switch to markup to see the changes
User avatar
Joris MASSON (jmasson)2016-06-06 12:22
  • Acceptance criteria
    Something went wrong, the follow up content couldn't be loaded
    Only formatting have been changed, you should switch to markup to see the changes
User avatar
  • Acceptance criteria
    Something went wrong, the follow up content couldn't be loaded
    Only formatting have been changed, you should switch to markup to see the changes
User avatar
  • Acceptance criteria
    Something went wrong, the follow up content couldn't be loaded
    Only formatting have been changed, you should switch to markup to see the changes
User avatar
  • So that
    Something went wrong, the follow up content couldn't be loaded
    Only formatting have been changed, you should switch to markup to see the changes
  • Acceptance criteria
    Something went wrong, the follow up content couldn't be loaded
    Only formatting have been changed, you should switch to markup to see the changes