gwu-libraries / clint

Command Line INventory Tool
6 stars 1 forks source link

Auto calculate payload while editing a bag. Fixes #97 #104

Closed darshanrp closed 10 years ago

darshanrp commented 10 years ago

./clint edit bag <bag_id> allows to edit a bag, but while editing the bag it prompts the user for a payload doesn't recalculate it automatically. After the bag is edited inventory UI doesn't show any files in that bag. This is because the payload is not calculated again while editing the bag.

Screenshot after adding a new bag,

screenshot from 2014-03-17 18 15 23

Editing a bag prompts for payload,

(ENV)darshan@gwdev-darshan:~/projects/clint$ ./clint edit bag 5728
     --Bag--
      id: 5728
 bagname: newbag
bag type: Preservation
 created: 2014-03-17T18:09:57.072611
    item: <Item 38989/c018144rj90n>
 machine: <Machine 9>
absolute_filesystem_path: /home/darshan/projects/clint/test-data/newbag

Editable Fields
bagname: newbag
bag_type [Options: 1=Access, 3=Export, 2=Preservation]: 2
absolute_filesystem_path: /home/darshan/projects/clint/test-data/newbag
payload: 
machine: 9
item: 38989/c018144rj90n
created: 2014-03-17T18:09:57.072611

Bag Edited!

     --Bag--
      id: 5728
 bagname: newbag
bag type: Preservation
 created: 2014-03-17T18:09:57.072611
    item: <Item 38989/c018144rj90n>
 machine: <Machine 9>
absolute_filesystem_path: /home/darshan/projects/clint/test-data/newbag

Screenshot after editing a bag, image