The query below works, but it doesn't include logged time for sub-tasks, so when there isn't logged time for issue but there are there is logged time for at least for one sub task, the issue is still the query result.
issueFunction not in workLogged("after 2013/09/01 before 2020/09/30")
I would like the case when the time is logged to at least one sub task, the issue won't appear in the result set. Is it possible?
You can write your own JQL function which extends workLogged() function that it additionally returns issues with empty logged time which at least one sub-task have logged time.
String jqlQuery = "issueFunction in workLogged(\"" + operand.getArgs().get(0) + "\")"; SearchService.ParseResult parseResult = searchService.parseQuery(user, jqlQuery); if (parseResult.isValid()){ Query query = parseResult.getQuery(); try { SearchResults results = searchService.search(user, query, PagerFilter.getUnlimitedFilter()); List<Issue> issues = results.getIssues(); for (Issue issue: issues){ literals.add(new QueryLiteral(operand, issue.getId())); if (issue.isSubTask()){ literals.add(new QueryLiteral(operand, issue.getParentId())); } } } catch (SearchException e) { // Catch exception } }
This is pretty tricky. Although I'm kind of fatigued at the moment so I might be missing something.
The problem is that you want to query on the worklog index, but you return results from the issue index. Perhaps you can use the above query with another query that uses childrenOf ("your jql") to find issues that have no log worked on the parent but does have work logged on the children.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Michal,
When you use not in worklogged, why do you get Sub-tasks with logged time ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online 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.