{"action":"created","issue":{"url":"https://api.github.com/repos/irods/irods/issues/3553","repository_url":"https://api.github.com/repos/irods/irods","labels_url":"https://api.github.com/repos/irods/irods/issues/3553/labels{/name}","comments_url":"https://api.github.com/repos/irods/irods/issues/3553/comments","events_url":"https://api.github.com/repos/irods/irods/issues/3553/events","html_url":"https://github.com/irods/irods/issues/3553","id":229464215,"number":3553,"title":"Tickets cannot be retrieved if its String contains only numbers.  ","user":{"login":"mtamie","id":24915316,"avatar_url":"https://avatars3.githubusercontent.com/u/24915316?v=3","gravatar_id":"","url":"https://api.github.com/users/mtamie","html_url":"https://github.com/mtamie","followers_url":"https://api.github.com/users/mtamie/followers","following_url":"https://api.github.com/users/mtamie/following{/other_user}","gists_url":"https://api.github.com/users/mtamie/gists{/gist_id}","starred_url":"https://api.github.com/users/mtamie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtamie/subscriptions","organizations_url":"https://api.github.com/users/mtamie/orgs","repos_url":"https://api.github.com/users/mtamie/repos","events_url":"https://api.github.com/users/mtamie/events{/privacy}","received_events_url":"https://api.github.com/users/mtamie/received_events","type":"User","site_admin":false},"labels":[{"id":227554583,"url":"https://api.github.com/repos/irods/irods/labels/consortium-member","name":"consortium-member","color":"62E5B0","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-05-17T19:36:07Z","updated_at":"2017-05-17T22:53:09Z","closed_at":null,"body":"Tickets can be created with a Ticket String that contains *only numbers*, but they cannot be retrieved using `iticket ls <TICKET STRING>` command.  \r\n\r\nSteps to reproduce:\r\n\r\n1. Create a ticket using a number as the Ticket String: \r\n    ` iticket create write file.txt 35776`\r\n2. Get the new ticket information:\r\n     `iticket ls 35776`\r\n3. No information is displayed *unless* another existing ticket ID is 35776.  But the ticket can be found by using `iticket ls`."},"comment":{"url":"https://api.github.com/repos/irods/irods/issues/comments/302253534","html_url":"https://github.com/irods/irods/issues/3553#issuecomment-302253534","issue_url":"https://api.github.com/repos/irods/irods/issues/3553","id":302253534,"user":{"login":"trel","id":55238,"avatar_url":"https://avatars0.githubusercontent.com/u/55238?v=3","gravatar_id":"","url":"https://api.github.com/users/trel","html_url":"https://github.com/trel","followers_url":"https://api.github.com/users/trel/followers","following_url":"https://api.github.com/users/trel/following{/other_user}","gists_url":"https://api.github.com/users/trel/gists{/gist_id}","starred_url":"https://api.github.com/users/trel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trel/subscriptions","organizations_url":"https://api.github.com/users/trel/orgs","repos_url":"https://api.github.com/users/trel/repos","events_url":"https://api.github.com/users/trel/events{/privacy}","received_events_url":"https://api.github.com/users/trel/received_events","type":"User","site_admin":false},"created_at":"2017-05-17T22:53:09Z","updated_at":"2017-05-17T22:53:09Z","body":"I'm considering simply disallowing any new ticket string that is only numbers.\r\n\r\nIs this a sufficient solution for your use case?\r\nDoes this prevent anything you are trying to do?\r\n\r\nSomething like this:\r\n```diff\r\n--- a/plugins/database/src/db_plugin.cpp\r\n+++ b/plugins/database/src/db_plugin.cpp\r\n@@ -14594,6 +14594,11 @@ irods::error db_mod_ticket_op(\r\n \r\n     /* create */\r\n     if ( strcmp( _op_name, \"create\" ) == 0 ) {\r\n+\r\n+        if (isInteger((char*)_ticket_string)) {\r\n+                return ERROR( CAT_TICKET_INVALID, \"ticket string cannot be a number\" );\r\n+        }\r\n+\r\n         status = splitPathByKey( _arg4,\r\n                                  logicalParentDirName, MAX_NAME_LEN, logicalEndName, MAX_NAME_LEN, '/' );\r\n         if ( strlen( logicalParentDirName ) == 0 ) {\r\n```"}}
{"actor":{"display_login":"trel"}}