Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "Copy to clipboard" button to status bar #21

Closed
vody opened this issue Oct 18, 2018 · 9 comments
Closed

Add "Copy to clipboard" button to status bar #21

vody opened this issue Oct 18, 2018 · 9 comments
Assignees

Comments

@vody
Copy link

vody commented Oct 18, 2018

During Jira issue development I am usually need to have a fast access to Jira issue key to use it in commit message or code comments. It would be good to add a "Copy to Clipboard" action button after Working Issue one in a status bar. Action should put working Jira issue key in clipboard in one click. This would allow to use it in commit message, code comments or snippets as well.

@gioboa gioboa self-assigned this Oct 19, 2018
@gioboa
Copy link
Owner

gioboa commented Oct 20, 2018

Hi @vody,
the ability for VsCode extensions to do "copy to clipboard" is under development.
Have a look at this commit
When the API is ready I will implement this feature. 👍

UPDATE

This plugin work with clipboard, I prefer wait VsCode core API.

@gioboa
Copy link
Owner

gioboa commented Nov 22, 2018

Waiting for VsCode core API.

@gioboa gioboa closed this as completed Nov 22, 2018
@gioboa
Copy link
Owner

gioboa commented Nov 29, 2018

I'm implementing the feature "copy to clipboard". @vody do you think that more generic option in the issue menu can do the job?

@gioboa gioboa reopened this Nov 29, 2018
@gioboa
Copy link
Owner

gioboa commented Dec 2, 2018

Add copy to clipboard with #40 PR. 👍

@gioboa gioboa closed this as completed Dec 2, 2018
@vody
Copy link
Author

vody commented Jan 13, 2019

Thank you @gioboa for this command. My minor comments are:

  • My scenario was more about using Jira Key so can be used in commits or snippets. This cases would not require a summery, just key.
  • I did try to use your new command with Status Bar Extension to do a an action as I need it, but failed as it is allowed to be executed only from EXPLORER (I think it is due to an idea that user select one in explorer, but I was about a current issue (of course only if there is one selected)):
    image
    Settings:
    "statusbar_command.commands": [ { "text": "$(clippy)", "tooltip": "Copy Jira Key to Clipboard", "alignment": "left", "priority": 90, "command": "jira-plugin.copyJiraSummary" } ]
    It would work if there would be a code which would allow to pick current work item in case if no one selected though explorer.

@gioboa
Copy link
Owner

gioboa commented Jan 14, 2019

Hi @vody ,
yes, the method has one parameter, if it's undefined return this error.
Here the method.
If you can't pass params, you must create a new command for copy current working issue key.
Could be nice add a setting for set which data has to be copy. (key/summary/key+summary)

@gioboa gioboa reopened this Jan 14, 2019
@gioboa
Copy link
Owner

gioboa commented Jan 15, 2019

Would you like create a pull request for this feature? 👍 ❓

@vody
Copy link
Author

vody commented Jan 15, 2019

@gioboa, I would try (no promises as I am not good in ts) 👍 How to get a current work item reference?

@gioboa
Copy link
Owner

gioboa commented Jan 15, 2019

Don't worry about TS, it's easy and much cleaner than vanilla js. Working Item reference is in this object. 👍

@gioboa gioboa closed this as completed Jan 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants