Project

General

Profile

Actions

Feature #1734

closed

Forms: refactor functions

Added by Alexander Watzinger over 2 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Category:
Backend
Target version:
Start date:
2022-06-06
Estimated time:
16.00 h

Description

Because of the generic form functions, which is generally a good approach to manage the complex model relations, we ended up with very long if/else constructs that can get quite confusing.
This concerns especially the functions at openatlas/forms:
  • process_form_data()
  • process_origin_data()
  • populate_update_form()
  • additional_fields()

After testing a new approach with similar software we decided to remedy this with creating form manager classes that handle specific entity (and link) forms individually instead of using growing if/else constructs for all forms, before adding functionality in this area.

Miscellaneous refactoring
  • Moving logger from app to g
  • Solving some non top level imports
  • Replacing if/else with or

Related issues 8 (2 open6 closed)

Related to OpenAtlas - Feature #1761: Forms: don't show empty type fieldsClosedAlexander Watzinger2022-07-23Actions
Related to OpenAtlas - Feature #1768: Forms: improved validationsClosedAlexander Watzinger2022-07-26Actions
Precedes OpenAtlas - Feature #1587: Link artifacts and human remains to places directlyClosedAlexander Watzinger2022-06-07Actions
Precedes OpenAtlas - Feature #1637: Linking subunits like places, e.g. with eventsClosedAlexander Watzinger2022-06-07Actions
Precedes OpenAtlas - Feature #1641: Acquisition in combination with artifactsClosedAlexander Watzinger2022-06-07Actions
Precedes OpenAtlas - Feature #1648: Relative Chronological/Spatial relation between two artifactsAcknowledged2022-06-09Actions
Precedes OpenAtlas - Feature #1647: Composition of artifacts and human remainsClosedAlexander Watzinger2022-06-08Actions
Precedes OpenAtlas - Feature #1750: Linking movements with line objects, e.g. roadsAcknowledged2022-06-07Actions
Actions #1

Updated by Alexander Watzinger over 2 years ago

  • Precedes Feature #1587: Link artifacts and human remains to places directly added
Actions #2

Updated by Alexander Watzinger over 2 years ago

  • Precedes Feature #1637: Linking subunits like places, e.g. with events added
Actions #3

Updated by Alexander Watzinger over 2 years ago

  • Precedes Feature #1641: Acquisition in combination with artifacts added
Actions #4

Updated by Alexander Watzinger over 2 years ago

  • Related to Feature #1647: Composition of artifacts and human remains added
Actions #5

Updated by Alexander Watzinger over 2 years ago

  • Precedes Feature #1648: Relative Chronological/Spatial relation between two artifacts added
Actions #6

Updated by Alexander Watzinger over 2 years ago

  • Related to deleted (Feature #1647: Composition of artifacts and human remains)
Actions #7

Updated by Alexander Watzinger over 2 years ago

  • Precedes Feature #1647: Composition of artifacts and human remains added
Actions #8

Updated by Alexander Watzinger over 2 years ago

  • Description updated (diff)
Actions #9

Updated by Alexander Watzinger over 2 years ago

  • Status changed from Acknowledged to In Progress
  • Assignee set to Alexander Watzinger
Actions #10

Updated by Alexander Watzinger over 2 years ago

  • Precedes Feature #1750: Linking movements with line objects, e.g. roads added
Actions #11

Updated by Alexander Watzinger over 2 years ago

  • Description updated (diff)
Actions #12

Updated by Alexander Watzinger over 2 years ago

  • Related to Feature #1761: Forms: don't show empty type fields added
Actions #13

Updated by Alexander Watzinger over 2 years ago

  • Subject changed from Refactor form functions to Forms: refactor functions
Actions #14

Updated by Alexander Watzinger over 2 years ago

Actions #15

Updated by Alexander Watzinger over 2 years ago

  • Status changed from In Progress to Closed
Actions #16

Updated by Alexander Watzinger over 2 years ago

  • Description updated (diff)
Actions

Also available in: Atom PDF