Adding Always Updatable logic which over right Always updatable flag value.

Description

Currently for processed record, either we are able to keep updatable or not either. But there are some cases where we like to make field updatable on processed record conditionally.

For example in case we want to make some role able to update field data even after processed, while for all other users, it should not able to update.

So idea is to add always updatable logic which if provided overwrite value in Always updatable field.

Environment

None

Activity

Heng Sin Low 
October 6, 2022 at 5:55 AM

Hi , please document this new feature at wiki, thanks.

Deepak Pansheriya 
September 25, 2022 at 1:02 PM

updated logic as your suggestions and same are in existing PR.

Heng Sin Low 
September 22, 2022 at 12:48 AM

hi , yes and following the existing readonlylogic approach, *logic is only check when checkcontext is true.

Deepak Pansheriya 
September 21, 2022 at 5:59 PM

sorry I did not read second part in this comments and did not realized that there is comments for me.

Now trying to understand inconsistency part. So you mean that if it is Always updatable then we should keep it Always updatable but if not always updatable, then evaluate Always updatable logic and make it editable if it return true.

Is this correct?

Heng Sin Low 
August 2, 2022 at 5:08 AM
(edited)

,

#2 is not correct, in current code:

  • AD_Tab.IsReadonly and AD_Field.IsReadonly > AD_Field.IsAlwaysUpdateable. At GridField.isEditable (Properties ctx, boolean checkContext,boolean isGrid), it check AD_Tab.IsReadonly and AD_Field.IsReadonly at line 440 follow by IsAlwaysUpdateable check at line 447.

  • AD_Field.IsAlwaysUpdateable > AD_Field.ReadonlyLogic. At GridField.isEditable (Properties ctx, boolean checkContext,boolean isGrid), it check IsAlwaysUpdateable at line 447 follow by ReadOnlyLogic check at line 503.

, in PR 1408, AlwaysUpdatableLogic is only check and override IsAlwaysUpdateable when IsAlwaysUpdateable is true. This is inconsistent with how current code deals with IsReadonly and ReadonlyLogic. I don’t think such inconsistency is a good thing to have.

Regards,

Low

Fixed

Details

Assignee

Reporter

Fix versions

Priority

Created July 15, 2022 at 8:44 AM
Updated December 29, 2023 at 3:24 PM
Resolved December 29, 2023 at 3:24 PM