{"action":"closed","issue":{"url":"https://api.github.com/repos/fossology/fossology/issues/62","labels_url":"https://api.github.com/repos/fossology/fossology/issues/62/labels{/name}","comments_url":"https://api.github.com/repos/fossology/fossology/issues/62/comments","events_url":"https://api.github.com/repos/fossology/fossology/issues/62/events","html_url":"https://github.com/fossology/fossology/issues/62","id":53720306,"number":62,"title":"can not edit the information for a license ","user":{"login":"yaobinshi","id":8425217,"avatar_url":"https://avatars.githubusercontent.com/u/8425217?v=3","gravatar_id":"","url":"https://api.github.com/users/yaobinshi","html_url":"https://github.com/yaobinshi","followers_url":"https://api.github.com/users/yaobinshi/followers","following_url":"https://api.github.com/users/yaobinshi/following{/other_user}","gists_url":"https://api.github.com/users/yaobinshi/gists{/gist_id}","starred_url":"https://api.github.com/users/yaobinshi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yaobinshi/subscriptions","organizations_url":"https://api.github.com/users/yaobinshi/orgs","repos_url":"https://api.github.com/users/yaobinshi/repos","events_url":"https://api.github.com/users/yaobinshi/events{/privacy}","received_events_url":"https://api.github.com/users/yaobinshi/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/fossology/fossology/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/fossology/fossology/labels/Category:%20UI","name":"Category: UI","color":"ededed"},{"url":"https://api.github.com/repos/fossology/fossology/labels/Priority:%20Normal","name":"Priority: Normal","color":"ededed"},{"url":"https://api.github.com/repos/fossology/fossology/labels/Status:%20New","name":"Status: New","color":"ededed"},{"url":"https://api.github.com/repos/fossology/fossology/labels/Tracker:%20Bug","name":"Tracker: Bug","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-01-08T06:47:34Z","updated_at":"2015-12-21T20:14:06Z","closed_at":"2015-12-21T20:14:06Z","body":"---\n\n\nAuthor Name: **larry shi** \nOriginal Redmine Issue: 1443, http://www.fossology.org/issues/1443\nOriginal Date: 2012/03/08\nOriginal Assignee: Bob Gobeille\n\n---\n\nreproduce:\r\n1. click on [Admin]-->[License Admin] menu, then click on any edit icon, click on the link 'update' to change some items of this license.\r\n2. repeat the step 1, get one error msg :\r\n\r\nFile: /usr/local/share/fossology/www/ui/admin-license-file.php, Line number: 361\r\nERROR: duplicate key value violates unique constraint \"rf_md5unique\"\r\nUPDATE license_ref set rf_active='true', marydone='false', rf_shortname='3DFX', rf_fullname='', rf_url='', rf_notes='', rf_text_updatable='false', rf_detector_type='2', rf_text='License by Nomos.', rf_md5='2837743839a3f8e500aed1b9144452bb' WHERE rf_pk='202'\r\n\r\n#0  debugbacktrace() called at [/usr/local/share/fossology/lib/php/common-db.php:158]\r\n#1  DBCheckResult(, UPDATE license_ref set\r\n                 rf_active='true', \r\n                 marydone='false',\r\n                 rf_shortname='3DFX',\r\n                 rf_fullname='',\r\n                 rf_url='',\r\n                 rf_notes='',\r\n                 rf_text_updatable='false',\r\n                 rf_detector_type='2',\r\n                 rf_text='License by Nomos.',\r\n                 rf_md5='2837743839a3f8e500aed1b9144452bb'\r\n            WHERE rf_pk='202', /usr/local/share/fossology/www/ui/admin-license-file.php, 361) called at [/usr/local/share/fossology/www/ui/admin-license-file.php:361]\r\n#2  admin_license_file->Updatedb(Array ([rf_pk] => 202,[req_marydone] => all,[req_shortname] => All,[updateit] => true,[rf_active] => true,[marydone] => false,[rf_shortname] => 3DFX,[rf_fullname] => ,[rf_text] => License by Nomos.,[rf_text_updatable] => false,[rf_detector_type] => 2,[rf_url] => ,[rf_notes] => )) called at [/usr/local/share/fossology/www/ui/admin-license-file.php:457]\r\n#3  admin_license_file->Output() called at [/usr/local/share/fossology/www/ui/index.php:51]\r\n\r\n\r\nthe reason is because for now, almost all the 'license text' are 'License by Nomos.', but definition of license_ref say rf_md5 should be unique, rf_md5 is from md5(rf_text) .\n\n\n"}}