I'm not very proficient in English, so I might be mistaken, but I want to put the count of child issues with a status of 'Closed' in the parent issue's field using Jira Automation. Can you please advise me on how to do this?
If you want to use automation, you can use something like this
"Word Count" is a convenient numeric in my setup.
Its value is being set to
{{lookupIssues.size}}
that is the results of the JQL lookup
There are pros and cons to using editable fields vs read-only scripted fields that would depend on your use case.
What are you trying to solve?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for your answer. It was solved by implementing it as I was taught.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If one of the answers solved your query, could you mark it as answer accepted for other members to find.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you have got an answer to a question that solves your problem, you can click the "Accept Answer" button to indicate to other users with a similar issue that there is a fix.
Best
Tom
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @koutarou ishibashi - You need to have a Scripted field which is available via Script Runner Plug-in and do something like below
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.search.SearchProvider
import com.atlassian.jira.jql.parser.JqlQueryParser
import com.atlassian.jira.web.bean.PagerFilter
def jqlQueryParser = ComponentAccessor.getComponent(JqlQueryParser)
def searchProvider = ComponentAccessor.getComponent(SearchProvider)
def customFieldManager = ComponentAccessor.getCustomFieldManager()
def customField = customFieldManager.getCustomFieldObjectsByName("FieldName").first()
def user = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()
// jql query to get the Child Issues with Closed issues
def query = jqlQueryParser.parseQuery("issueFunction in issuesInEpics('project in (MyProject) AND status = "CLOSED')")
def results = searchProvider.search(query, user, PagerFilter.getUnlimitedFilter())
//Get Results
def result = searchService.search(jobUser, query, PagerFilter.getUnlimitedFilter())
def issues= result.getResults()
//log.warn("issues are" + issues)
return issues
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for your answer. JIRA Automation solved it
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.
Register NowOnline forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.