SubTasks not showing when filtering with assignee field value

Omprakash Thamsetty
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 17, 2015


Hi All

We are creating the subTask and calling the workflow post function to get assignee filed values from parent. Its creating and I am able to see the assignee filed value too. But When I am querying to see total number of subtask assigned to user then list is not showing. Assignee field value is mentioned at the top in workflow post function and then indexing.

I am facing the exactly mentioned in another forum question but did not see fix for it. Here is the link
https://answers.atlassian.com/questions/9389889

Querying by following steps to see subtasks.

1) Click on Issues -- > More --> new Filter
2) Select the Project
3) Select the type of issue
4) Select the Status

So far all subTask showing correct but when I am filtering for particular user, which we created subtask and getting the values from parent then its return null. Not showing any record.

My Jira version is 6.4.12.

 

Screen shotsSubTask_assignee.jpg

 



SubTask_assignee1.jpg

 

See above no issues are showing.

2 answers

1 accepted

0 votes
Answer accepted
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 17, 2015

The most likely explanation is that your "workflow post function to get assignee filed values from parent" does not index the sub-tasks.  It needs to do that.

Omprakash Thamsetty
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 18, 2015

@Nic Brough [Adaptavist] I have already doing the index in workflow post function. Please see below screen shot. I am unable to change the positions. Anything I am missing here?

 

I have limited access to update the comment in this forum. I need to get 2 points to get unlimited access.

 

workflow_postFunction_reindex.jpg

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 18, 2015

It's the same answer - your sub-tasks look like they are not being indexed. Let's test that rather than going around in circles - run the transition, check that the search fails as per your original question, then make a minimal edit to *the subtask* (stick a . on the end of a text field, change the reporter etc). Avoid touching any of the four fields you have copied though, that could complicate tracing what is happening. Once you've made a change, try the original test again - does it work this time?

Omprakash Thamsetty
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 18, 2015
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 18, 2015

Sorry, I need the test result clarifying. You are saying that: 1) You ran the transition 2) You ran the search and got 0 results 3) You did a minor edit 4) You ran the search and got 1 result Is that correct?

Omprakash Thamsetty
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 18, 2015

@Nic Brough [Adaptavist] yes. Correct.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 18, 2015

Ok, that proves that your process is not indexing the sub-tasks. So, where are you running this transition? It's not on the sub-task because that would index it

Omprakash Thamsetty
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 18, 2015

@Nic Brough [Adaptavist] I am opening the parent task and then creating the sub-task from there. The workflow post functions are placed in sub-task "Create" transition.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 18, 2015

Oh, hang on, I'd missed that - "create". There's a bug in the function that means it can't index fields on create. I think it's limited to system fields - could you check if you can replicate the problem with "frequency" (as that's a custom field, not system)

Omprakash Thamsetty
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 18, 2015

@Nic Brough [Adaptavist] . I reproduced the issue and then I searched with "Frequency" field then its showing the results. But not for assignee field. Is there a way to fix for system fields indexing for sub-task?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 18, 2015

Not that I know of. It's a bug in the JSU add-on from what I can see. I'd raise it at https://jsutil.atlassian.net/browse/JSUTIL

Omprakash Thamsetty
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 18, 2015

@Nic Brough [Adaptavist] Can I have the ticket number so that I will also add watcher to that? Thanks for the information and help on this

Omprakash Thamsetty
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 18, 2015

@Nic Brough [Adaptavist] Is the issue number JSUTIL-274 in JSUTIL ?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 18, 2015

Well spotted - I didn't have it bookmarked, and didn't look, but that is what I was thinking of. Sorry I didn't notice the "create" problem earlier!

0 votes
Omprakash Thamsetty
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 3, 2015

We did work around on this. We added script workflow function from inline function and then running the sql command to convert the user-name from upper case to lower case. Here is the image and then script that we are using. Hope it may help others this work around until fix the bug.

 

workflowPostfun.jpg

 

//Import items for SQL Update Statement:
import com.atlassian.jira.ComponentManager
import groovy.sql.Sql
import java.sql.Connection
import org.ofbiz.core.entity.ConnectionFactory
import org.ofbiz.core.entity.DelegatorInterface
import com.atlassian.jira.event.issue.AbstractIssueEventListener
import com.atlassian.jira.event.issue.IssueEvent
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.ComponentManager
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.IssueManager
import com.atlassian.jira.util.ImportUtils
import com.atlassian.jira.issue.index.IssueIndexManager

ComponentManager componentManager = ComponentManager.getInstance()

//Create and run the SQL Update statement to change the assignee to Lower Case
delegator = (DelegatorInterface) componentManager.getComponentInstanceOfType(DelegatorInterface.class)
String helperName = delegator.getGroupHelperName("default");
def UpdateId = issue.getId()

//Make sure to change the schema as per JIRA db
def sqlStmt = """
    UPDATE [jiraschemaP].[jiraissue]
    SET [ASSIGNEE] = LOWER([ASSIGNEE])
    WHERE id = '""" + UpdateId + """';
"""
//sqlStmt.toString()
Connection conn = ConnectionFactory.getConnection(helperName);
Sql sql = new Sql(conn)
StringBuffer sb = new StringBuffer()
sql.execute(sqlStmt)

//Now run the re-index on this issue
    IssueIndexManager indexManager = ComponentManager.getInstance().getIndexManager()
    boolean wasIndexing = ImportUtils.isIndexIssues()
    ImportUtils.setIndexIssues(true)    
    IssueManager issueManager = ComponentManager.getInstance().getIssueManager()
    indexManager.reIndex(issueManager.getIssue(issue.id))
    ImportUtils.setIndexIssues(wasIndexing)

Suggest an answer

Log in or Sign up to answer