我想使用项目编号从命令行在MKS中打开一个项目:
command 123456
直接进入gui项目视图。我一直在谷歌搜索API示例,但还没有发现任何有用的东西。在扩展程序中,我将使用它从我的文本编辑器中创建一个快捷方式。
希望这是可能的,任何想法?
答案 0 :(得分:2)
im viewissue
是“查看项目”的cli命令。
在您的情况下,命令应该是这样的:
im viewissue --hostname=%mks_host% --port=%mks_im_port% --user=%mks_user% --gui %item_id%
其中%mks_host%
,%mks_im_port%
,%mks_user%
和%item_id%
应替换为正确的值。
im viewissue
命令用法
Usage: im viewissue options... item id...; options are:
--asOf=[<date>|label:<label>] View the item(s) as of a historical date or label
--height=value The height in pixels of the windows
--[no]showAnnotations Display annotations
--[no]showAttachmentDetails Display all attachment attributes
--[no]showAttachments Display attachments
--[no]showBranches Display branches
--[no]showChangePackages Display change packages
--[no]showDecorators Display "!" for ambiguous field values
--[no]showHistory Display history
--[no]showHistoryAscending Display history in chronological order
--[no]showHistoryWithComputedField Display history with computed fields
--[no]showHistoryWithIndirectEdits Display history with indirect edits (CLI/API only)
--[no]showLabels Display labels
--[no]showLock Display lock information
--[no]showRelationships Display relationships
--[no]showRichContent Display rich text field data as rich content
--[no]showSourceLinkDetails Display all source link and source trace attributes
--[no]showSourceTraceDetails Display all source link and source trace attributes
--[no]showTestResults Display test results
--[no]showTimeEntries Display time entries
--[no]showWorkflow Display workflow
--[no]showXHTML Display rich text field data as XHTML
--[no]substituteParams Substitute parameters
--width=value The width in pixels of the windows
-x value The x location in pixels of the window
-y value The y location in pixels of the window
-? Shows the usage for a command
--[no]batch Control batch mode (no user interaction in batch mode)
--cwd=value Act as if command executed in specified directory
-F value Read the selection from a specified file
--forceConfirm=[yes|no] Specify an answer to all confirmation questions
-g User interaction should happen via the GUI
--gui User interaction should happen via the GUI
--hostname=value Hostname of server
-N Responds to all confirmations with "no"
--no Responds to all confirmations with "no"
--password=value Credentials (e.g., password) to login with
--port=value TCP/IP port number of server
--quiet Control status display
--selectionFile=value Read the selection from a specified file
--settingsUI=[gui|default] Control UI for command options
--status=[none|gui|default] Control status display
--usage Shows the usage for a command
--user=value Username to login to server with
-Y Responds to all confirmations with "yes"
--yes Responds to all confirmations with "yes"
答案 1 :(得分:1)
虽然似乎没有标准的API命令可以从CLI将您带到Web GUI中的项目,但您可以构建一个标准URL来直接从Web浏览器查看任何给定项目。
通过网络浏览器直接通过项目ID访问项目的URL将是:
<强>%host_server%:%端口%/ IM / viewissue选择=%ITEM_ID%强>
其中:
示例:如果我的Integrity应用程序在端口1234上的服务器https://myhostserver.com上可用,并且我要查看的项ID是123456,那么要构造的URL是:
然后,可以动态创建此链接以访问任何现有的Integrity项ID。在查看项目之前,仍然需要用户在Integrity中进行身份验证。