Create automation in jira that resolves issue and adds description of said comment to other issue - jira

I keep getting automated support tickets from a system in our infrastructure to jira and the summary always follow the same pattern: [firing] {{issue-name}} or [resolved] {{issue-name}}
So, my goal would be, that when the issue with resolved is created, that it automatically gets cancelled and the ticket with firing and the same issue-name in it gets resolved and a comment added in the issue with the description of the "resolved" issue.
I have tried linking the issues together based on the same name, but jira won't let me do that in automation.
I hope you guys have an idea on how to fix it!
We are currently using Jira 8.20.10

Related

Kiwi reporting to JIRA issue

I want Kiwi to report bugs to JIRA. I have configured the JIRA bugtracker in the config page. I go to my test run an click on report. I select my JIRA issue tracker and click on report. Then I get no response. I check the Chrome's console, it shows JS error "Uncaught TypeError: Cannot read property 'rc' of undefined testrun_actions.js:460 ". Kiwi is 7.2 runnig in a docker conrainer.
How can I make this working?
This is definitely a bug. Maybe a couple of them. The UI should be more tolerant to these errors and inform the user what's going on.
As to why this happens I can't tell. This appears to be reported in
https://github.com/kiwitcms/Kiwi/issues/1333 which speaks about a TC text with 3.5KB size. This is quite a lot of text and depending on what JIRA accepts there may not be anything we can do about it.
Will follow up on the GitHub issue. If the original question isn't related please leave a comment indicating so.

PhpStorm and Jira integration

Due to Atlassian IDE Connector is outdated, trying to use build in Task management system.
Adding server:
And then trying to browse tasks but getting error:
Cannot connect to https://*.atlassian.net Request failed. Reason: "Field 'summary' does not exist or this field cannot be viewed by anonymous users." "Field 'assignee' does not exist or this field cannot be viewed by anonymous users." "Field 'resolution' does not exist or this field cannot be viewed by anonymous users."
Maybe someone faced similar problem?
I had the same issue today. It started occurring when i tried to mark Update issue state to "In Progress"
From that point on every time i tried to work with this task or add new ones i got similar error messages.
The only solution that i could find was to remove the already affected tasks first.
And after that uncheck "Update issue state" in "Open Task" options.
Unfortunately now there is no way to influence task status from PHPStorm.
It's a temporary solution at best, hopefully Atlassian does something about this soon.
I've found a workaround for such an issue. It's working for me, however it's not perfect or handy in any way. phpStorm is collecting JIRA issue data somehow (it allows you to search thru the issue acronyms and lets you pick up one issue to time tracking). However with the problem which is occuring right now it's not possible for phpStorm to gather/update new issue data from connected projects to your account.
The workaround is to open the Atlassian Connector settings, JIRA Server section, when you have your credentials entered, just press "Test Connection". Probably it will report an error, but, surprisingly for me, task list in phpStorm is updated, new tasks appear...
Please try it, maybe this will work for you too?
Thought I would put a solution on this page found it in Chinese and it's really quite embarrassing I missed this as well.
The below is the ending point for working on a task which will give you the option to commit changes, merge branches, and yep Update Issue State.
Tools > Tasks & Context > Close Active Task... (Alt + Shift + W)
Just checked today, no errors and everything working fine.

JQL is not working as per expected

This is an interesting thing. I created a JIRA issue using a java rest client provided by JIRA(JiraRestClient). When I try to search the issue in the JIRA ui by using JQL in advanced search
reporter = user123(where user123 is the user i used to create the issue)
I can't find that issue in the results. But when I manually update that issue.. say comment on it and then run the above query again I see that issue in the results.
Can anyone explain why is this happening ?
JQL relies on lucene index and looks like issues created by the JiraRestClient are not indexed till you update them (issue is indexed on update). For me it sounds like a bug.
To be sure please launch full reindex https://confluence.atlassian.com/display/JIRA/Search+Indexing and then try to reproduce your case.

Assigning Resolved Issues to Reporter Except If Reporter Is Not In QA Group

I am currently revising our JIRA workflow and issue routing and have the following predicament.
I want to assign all resolved issues back to the original reporter EXCEPT when the reporter is not in the QA Group. Then the issue should be assigned to a single user instead (in this case our QA Lead).
Having researched several plugins and threads I have yet to find anything similar or anything that would help achieve that.
If you require more information, please let me know. Your help, as always, is greatly appreciated.
EDIT:
Jira Version 5.2
We wrote a similar custom plugin for a customer:
"This post function can be added to a transition such as Resolve
where a developer is indicating that the issue is ready for
testing. The aim is to reduce QA manager triage work.
If the reporter is a member of a configured group such as QA:
Then change the assignee to the reporter
Else change the assignee to the configured lead of the QA group"
Please email info#customware.net if this sounds relevant.
~Matt
What do you mean by "wish to assign all resolved issues"?
If you mean you want to go over all issues and do this then you better you can use the REST API, for example use jira-python to write a script that will go trough all issues and make the changes.
If you want to apply this rule to all issue being resolved- this can be done quite easily using Jira's scripting suite or Jira Groovy Runner (depends on your jira version) to attach a post function to the resolve issue transition in the workflow that will check each issue and make the needed changes.
If you need help with coding any of those solutions or more information let me know..
Update
Using Jira Groovy Runner, add a script post function to the resolve transition to your workflow. the script should be something like:
import com.atlassian.jira.issue.Issue;
import com.atlassian.jira.issue.MutableIssue
import com.atlassian.jira.ComponentManager
import com.atlassian.jira.user.util.UserManager
import com.atlassian.jira.security.groups.GroupManager
import com.atlassian.crowd.embedded.api.User
MutableIssue myIssue = issue
User reporter= issue.getReporter()
GroupManager usersGroup = (GroupManager) ComponentManager.getComponentInstanceOfType(GroupManager.class);
Collection<String> currentUserGroups = usersGroup.getGroupNamesForUser(reporter)
if ('QA' in currentUserGroups) {
// assign issues back to the original reporter
issue.setAssignee(reporter)
} else {
// EXCEPT when the reporter is not in the QA Group
// Then the issue should be assigned to the QA Lead.
issue.setAssignee(ComponentManager.instance.userUtil.getUserObject('qa_leader_name'))
}
for more information check out Jira's API.

JIRA Issue type drop down list is blank when trying creating an issue

When I try creating an JIRA issue, my issue type list is blank. But it works just fine on another PC.
Is there any setting that I need to activate? Thank you in advance.
Without more detailed background on the difference between the two machines here are the possible fixes that come to mind:
Be sure that you are using the same user account with the same user priviliges
Check that you are using the same browser with all dependencies installed (java)
Consider re-indexing JIRA from the Administration Panel
Check your schemes to insure you don't have non-applicable dupes
Hope this helps.

Resources