Skip to content

Commit

Permalink
feat: rename fld_action_recommended to fld_description (#1028)
Browse files Browse the repository at this point in the history
* refactor: rename action_recommended field to description

* test: update test suite

* refactor: change fld_action_recommended to fld_description in database
  • Loading branch information
weibullguy authored Mar 11, 2022
1 parent 39fe6e7 commit 1db8524
Show file tree
Hide file tree
Showing 6 changed files with 153 additions and 156 deletions.
4 changes: 2 additions & 2 deletions data/postgres_program_db.sql
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,7 @@ CREATE TABLE ramstk_action (
fld_mechanism_id INTEGER NOT NULL,
fld_cause_id INTEGER NOT NULL,
fld_action_id INTEGER NOT NULL,
fld_action_recommended VARCHAR DEFAULT '',
fld_description VARCHAR DEFAULT '',
fld_action_category VARCHAR(512) DEFAULT '',
fld_action_owner VARCHAR(512) DEFAULT '',
fld_action_due_date DATE DEFAULT CURRENT_DATE + INTERVAL '30 day',
Expand Down Expand Up @@ -1236,7 +1236,7 @@ AS SELECT md.fld_revision_id,
mc.fld_description AS mc_description,
cs.fld_description AS cs_description,
ct.fld_description AS ct_description,
ac.fld_action_recommended AS ac_description,
ac.fld_description AS ac_description,
md.fld_mission,
md.fld_mission_phase,
md.fld_effect_local,
Expand Down
12 changes: 6 additions & 6 deletions src/ramstk/models/dbrecords/programdb_action_record.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class RAMSTKActionRecord(RAMSTK_BASE, RAMSTKBaseRecord): # type: ignore
"""

__defaults__ = {
"action_recommended": "",
"description": "",
"action_category": "",
"action_owner": "",
"action_due_date": date.today() + timedelta(days=30),
Expand Down Expand Up @@ -80,10 +80,10 @@ class RAMSTKActionRecord(RAMSTK_BASE, RAMSTKBaseRecord): # type: ignore
nullable=False,
)

action_recommended = Column(
"fld_action_recommended",
description = Column(
"fld_description",
String,
default=__defaults__["action_recommended"],
default=__defaults__["description"],
)
action_category = Column(
"fld_action_category",
Expand Down Expand Up @@ -131,7 +131,7 @@ class RAMSTKActionRecord(RAMSTK_BASE, RAMSTKBaseRecord): # type: ignore
def get_attributes(self):
"""Retrieve current values of the RAMSTKAction data model attributes.
:return: {cause_id, action_id, action_recommended,
:return: {cause_id, action_id, description,
action_category, action_owner, action_due_date,
action_status, action_taken, action_approved,
action_approved_date, action_closed,
Expand All @@ -141,7 +141,7 @@ def get_attributes(self):
return {
"cause_id": self.cause_id,
"action_id": self.action_id,
"action_recommended": self.action_recommended,
"description": self.description,
"action_category": self.action_category,
"action_owner": self.action_owner,
"action_due_date": self.action_due_date,
Expand Down
2 changes: 1 addition & 1 deletion src/ramstk/views/gtk3/fmea/panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -1428,7 +1428,7 @@ def __do_load_action(self, node: treelib.Node, row: Gtk.TreeIter) -> Gtk.TreeIte
_entity.cause_id,
0,
_entity.action_id,
_entity.action_recommended,
_entity.description,
"",
"",
"",
Expand Down
Loading

0 comments on commit 1db8524

Please sign in to comment.