Project

General

Profile

Feature #1734

Forms: refactor functions

Added by Alexander Watzinger 4 months ago. Updated about 2 months 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

Related to Feature #1761: Forms: don't show empty type fieldsClosed2022-07-23Actions
Related to Feature #1768: Forms: improved validationsClosed2022-07-26Actions
Precedes Feature #1587: Link artifacts and human remains to places directlyIn Progress2022-06-07Actions
Precedes Feature #1637: Linking subunits like places, e.g. with eventsClosed2022-06-07Actions
Precedes Feature #1641: Acquisition in combination with artifactsClosed2022-06-07Actions
Precedes Feature #1648: Relative Chronological/Spatial relation between two artifactsAssigned2022-06-07Actions
Precedes Feature #1647: Composition of ArtifactsAcknowledged2022-06-08Actions
Precedes Feature #1750: Linking movements with line objects, e.g. roadsAcknowledged2022-06-07Actions

History

#1

Updated by Alexander Watzinger 4 months ago

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

Updated by Alexander Watzinger 4 months ago

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

Updated by Alexander Watzinger 4 months ago

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

Updated by Alexander Watzinger 4 months ago

#5

Updated by Alexander Watzinger 4 months ago

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

Updated by Alexander Watzinger 4 months ago

#7

Updated by Alexander Watzinger 4 months ago

#8

Updated by Alexander Watzinger 4 months ago

  • Description updated (diff)
#9

Updated by Alexander Watzinger 4 months ago

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

Updated by Alexander Watzinger 4 months ago

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

Updated by Alexander Watzinger 2 months ago

  • Description updated (diff)
#12

Updated by Alexander Watzinger 2 months ago

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

Updated by Alexander Watzinger 2 months ago

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

Updated by Alexander Watzinger 2 months ago

#15

Updated by Alexander Watzinger 2 months ago

  • Status changed from In Progress to Closed
#16

Updated by Alexander Watzinger about 2 months ago

  • Description updated (diff)

Also available in: Atom PDF