gh icon indicating copy to clipboard operation
gh copied to clipboard

Jira plugin seems to not work properly

Open ipeychev opened this issue 10 years ago • 11 comments

[hook] gh jira LPS-56739 --assignee natecavanaugh --submittedLink https://github.com/natecavanaugh/liferay-portal/pull/3327 --t... ? LPS-56739 Setting the Start parameter in Numbered List Properties does not work: Assign to nathan.cavanaugh Assigning issue to nathan.cavanaugh fatal: Can't transition. No component found, try --component "JavaScript".

ipeychev avatar Jul 06 '15 08:07 ipeychev

Bruno Basto just reported this to me.

Can you please remove ~/.gh.json by logging out and logging in again to see if this problem persists?

gh us --logout and then gh us --login and entering your credentials might solve this issue.

Please let me know of your findings.

henvic avatar Jul 07 '15 19:07 henvic

:+1:

brunobasto avatar Jul 07 '15 20:07 brunobasto

just to be clear, the :+1: was to the issue, not to the solution :)

@henvic logging out and logging in again didn't solve the issue. I guess the issue is with the gh-jira plugin. Looks like when making a transition, it should pass the components already set in the ticket.

brunobasto avatar Jul 07 '15 20:07 brunobasto

@henvic, after update gh jira don't ask me for the code review transition. Could you please take a look at this?

marcellustavares avatar Jul 14 '15 19:07 marcellustavares

Waiting for a createmeta method on the jira dependency.

Related pull rqeuest: https://github.com/steves/node-jira/pull/93

JIRA documentation: https://developer.atlassian.com/static/rest/jira/5.0.html#id200251

If this feature doesn't get added within the next 5-10 days, I am going to write a workaround to it myself [or use a fork I add with these changes until it's added there] as this is essential.

henvic avatar Jul 21 '15 22:07 henvic

May I suggest my Jira API wrapper as a replacement for node-jira? node-jira isn't under active development anymore and hasn't been for a while, and mine already supports the /issue/createmeta endpoint.

Repo: https://github.com/jenjinstudios/jira-connector

Docs: http://jenjinstudios.github.io/jira-connector/

floralvikings avatar Jul 22 '15 16:07 floralvikings

That's a pretty good idea, thanks for that @floralvikings!

zenorocha avatar Jul 22 '15 16:07 zenorocha

I don't know if this is the same issue, but usually the JIRA plugin doesn't update the right ticket for me. Most of the times it tries to update the ticket from the last commit of the master branch, not the one in my branch.

juliocamarero avatar Sep 17 '15 07:09 juliocamarero

@juliocamarero about that, can you take a look at https://github.com/node-gh/gh-jira/blob/bcffac7542247a6987be298ee5a751cd51775034/bin/jira.js#L104-L156 to see the current strategy to retrieve the JIRA issue to tell me how you think it should be improved (and in what order), please?

henvic avatar Oct 19 '15 19:10 henvic

Hey @henvic

the strategy looks terrific, I think the bug is not there. For example, when you post a message in the JIRA ticket saying "Just started reviewing" this always gets the right JIRA ticket for me (therefore, the logic is ok).

However, when I send to Brian the exact same pull request, then the ticket updated is usually the last one from the master branch.

I have recorded a video so that you can see how easy it is for me to reproduce:

  1. I fetch the pull
  2. Comment is added to the right JIRA ticket
  3. I send the pull to brian
  4. the gh jira command still contains the right JIRA ticket
  5. When the console asks me about the ticket to update, the ticket is wrong --> You can see in the picture below how the command executed is:
[hook] gh jira LPS-59566 --assignee brianchandotcom --submittedLink https://github.com/brianchandotcom/liferay-portal/pull/31192...

but then the console asks me about this ticket:

? Which user are you looking for? brian.chan
? LRQA-18729 Clean Up Prior Implementation: (Use arrow keys)

juliocamarero avatar Oct 20 '15 07:10 juliocamarero

gh-issue

juliocamarero avatar Oct 20 '15 07:10 juliocamarero