2020name_option = click .option ("--name" , help = "Name of the case." ,)
2121assignee_option = click .option ("--assignee" , help = "User UID of the assignee." )
2222description_option = click .option ("--description" , help = "Description of the case." )
23- notes_option = click .option ("--notes " , help = "Notes on the case." )
23+ findings_option = click .option ("--findings " , help = "Findings on the case." )
2424subject_option = click .option ("--subject" , help = "User UID of a subject of the case." )
2525status_option = click .option (
2626 "--status" ,
@@ -42,15 +42,16 @@ def _get_cases_header():
4242 "name" : "Name" ,
4343 "assignee" : "Assignee" ,
4444 "status" : "Status" ,
45+ "subject" : "Subject" ,
4546 "createdAt" : "Creation Time" ,
46- "findings " : "Notes " ,
47+ "updatedAt " : "Last Update Time " ,
4748 }
4849
4950
5051def _get_events_header ():
5152 return {
5253 "eventId" : "Event Id" ,
53- "eventTimestatmp " : "Timestamp" ,
54+ "eventTimestamp " : "Timestamp" ,
5455 "filePath" : "Path" ,
5556 "fileName" : "File" ,
5657 "exposure" : "Exposure" ,
@@ -68,17 +69,17 @@ def cases(state):
6869@click .argument ("name" )
6970@assignee_option
7071@description_option
71- @notes_option
72+ @findings_option
7273@subject_option
7374@sdk_options ()
74- def create (state , name , subject , assignee , description , notes ):
75+ def create (state , name , subject , assignee , description , findings ):
7576 """Create a new case."""
7677 state .sdk .cases .create (
7778 name ,
7879 subject = subject ,
7980 assignee = assignee ,
8081 description = description ,
81- findings = notes ,
82+ findings = findings ,
8283 )
8384
8485
@@ -87,19 +88,19 @@ def create(state, name, subject, assignee, description, notes):
8788@name_option
8889@assignee_option
8990@description_option
90- @notes_option
91+ @findings_option
9192@subject_option
9293@status_option
9394@sdk_options ()
94- def update (state , case_number , name , subject , assignee , description , notes , status ):
95+ def update (state , case_number , name , subject , assignee , description , findings , status ):
9596 """Update case details for the given case."""
9697 state .sdk .cases .update (
9798 case_number ,
9899 name = name ,
99100 subject = subject ,
100101 assignee = assignee ,
101102 description = description ,
102- findings = notes ,
103+ findings = findings ,
103104 status = status ,
104105 )
105106
@@ -172,7 +173,7 @@ def _display_file_events(events):
172173@format_option
173174def show (state , case_number , format , include_file_events ):
174175 """Show case details."""
175- formatter = OutputFormatter (format , _get_cases_header () )
176+ formatter = OutputFormatter (format )
176177 try :
177178 response = state .sdk .cases .get (case_number )
178179 formatter .echo_formatted_list ([response .data ])
0 commit comments