FeatureEditor - automatic field input from user value

114 views
Skip to first unread message
Assigned to tobia....@geosolutionsgroup.com by lorenzo...@geosolutionsgroup.com

gaetan....@gmail.com

unread,
Jan 30, 2024, 9:53:46 AM1/30/24
to mapstore-developers
Hi,

I would like to propose a new FeatureEditor improvement.

  • The need
According to a user improvement request, we would like to contribute some FeatureEditor changes to allow automatic input field from authenticated user value (e.g name or id).

  • Use case

"As data manager,
I need that operator_name field must be completed automatically, 
To find out who has modified a feature"

  • Technical proposal 
- I think that security selector allow to get user info from FeatureEditor plugin
- We can change FeatureEditor config to add editorProps.fromUser property that will  map layer field to user field as.
- In addition, a Redux Epics will catch a feature / row modification to insert user info (some already exists).

I have tested to manipulate FeatureGrid changes in an existing Redux Epics :

https://github.com/geo2france/MapStore2/blob/013a2742775792644c9195acccab4b121aa910bf/web/client/epics/featuregrid.js#L757

This works fully with this config :

{
  "regex": {
    "attribute": "operateur",
    "typeName": "^terrain_eco_light$"
  },
  "allowEdit": false, // this is another featureGrid improvement
  "getValueFrom": {
    "user": "name"
  }
},

So, what do you thing about this improvement and technical proprosal ?

Thank you very mutch for your advice and feedback.

Gaëtan Bruel

gaetan....@gmail.com

unread,
Mar 4, 2024, 10:02:55 AM3/4/24
to mapstore-developers
Hi,

As I'm waiting for a reply, should I reconsider this proposal ?
Thanks.

Gaëtan

Tobia Di Pisa

unread,
Mar 7, 2024, 4:06:07 AM3/7/24
to mapstore-...@googlegroups.com
Dear Gaetan,

I'm sorry for not keeping in touch with you sooner. That's really appreciated, of course, but we still have to check it unfortunately. We will try to check it to get back to you as soon as we can.

Best regards,
     Tobia Di Pisa

--
You received this message because you are subscribed to the Google Groups "mapstore-developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapstore-develo...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/mapstore-developers/87c18019-e183-4c11-8c35-e55e6a83087bn%40googlegroups.com.


--


==
GeoServer Professional Services from the experts!

Visit http://bit.ly/gs-services-us for more information.
==
Dott. Ing. Tobia Di Pisa
Technical Lead / Project Manager


GeoSolutions Group
phone: +39 0584 962313

mobile: +39 340 1781783
fax:      +39 0584 1660272

https://www.geosolutionsgroup.com/
http://twitter.com/geosolutions_it
-------------------------------------------------------


Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia.

This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail.

tobia.dipisa

unread,
Jun 24, 2024, 1:14:39 PM6/24/24
to mapstore-developers
Dear Gaetan,

I'm really sorry for the late feedback. 
If I well understood what you are proposing, the need here is to automatically populate an attribute when a feature is saved without having the user doing that.
If that's the case (just for your information) there is a recent community module in GeoServer we have implemented for these purposes which is the Feature Autopopulate one.
Generally speaking, using that community module, where possible, ensures the same expected behavior also outside MapStore (e.g. if you edit a layer from another applications).
In any case, this is a support we could also consider to add to MS for people more focused on it for managing these aspects. Therefore, a PR could be finally raised on MS for proposing that update.
Beside that, I'm not sure at the moment if the place where you put the involved configuration is the right one; for this I would like to involve our developers for reviewing the PR and provide more precise indications.
Considering there are also other emails still involving the Attribute Table component where you are proposing additional updates, I think we can also schedule a call as soon as possible to better discuss together before you raise a PR.

Best Regards,
       Tobia Di Pisa
Reply all
Reply to author
Forward
0 new messages