Use of "was in" operator

Leirbag Assuab November 26, 2019

Hi,

This is embarrassing for me because maybe I'm doing something wrong and maybe it's obvious, but I'm not able to see it right now.

I execute this JQL below:

project = STS and created >= "2019/10/01" and created <= "2019/10/31" and assignee was in (e00002, a01559) order by key asc

It returns this issues list:

Screenshot-2.png

I execute another JQL, equivalent to prior one but with issue keys instead of created dates:

project = STS AND key >= STS-34490 AND key <= STS-36596 AND assignee was in (e00002, a01559) ORDER BY key ASC

It returns exactly same issues list:

Screenshot-3.png

But issue showed below (STS-34497) is not in the list and I can't figure out why. It seems that all JQL criteria is matched: project is ok, created date or issue key is included in interval searched, and user 'e00002' was assigned to this issue:

Screenshot-1.png

So, what is going on here? Am I doing something wrong? Perhaps I simply misunderstood use of "was in" operator? Or there's something more, like a bug in "was in" operator?

Our current version is 7.9.2 running over Oracle. I have successfully reindexed the instance but there aren't no changes in query results.

Please! Any help or suggestions?

2 answers

1 accepted

0 votes
Answer accepted
Ignacio Pulgar
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 26, 2019

Maybe the index is corrupted.

You may want to eliminate the index and build it again from scratch:

  1. Shutdown JIRA
  2. Delete all the contents from the following folder:
    $JIRA_HOME\caches\indexes
  3. Restart JIRA
  4. Perform a full re-index

Hope it helps.

Leirbag Assuab December 3, 2019

Hi @Ignacio Pulgar ! Thanks!

Your solution has worked! My JQL sentence is now returning all rows after rebuilding indexes from scratch.

I've fixed some workflow transitions before rebuilding indexes, as you and @Partibha Rani suggested. This should prevent errors in a future.

Thanks everyone for your support!

Like Ignacio Pulgar likes this
0 votes
Tuncay Senturk
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 26, 2019

Hi @Leirbag Assuab 

It seems to be a weird index problem. 

First, I'd recommend to index the project which is the faster than the system wide reindexing.

On the other hand, you can check for other issues, and see whether it is related to the transition from Open to In progress. I faced some issues that the Re-index post function might cause such problems. Make sure that those post functions are seen within that transition.

Run Integrity checker, so that you make sure there is nothing wrong with the workflows.

Best

Leirbag Assuab November 26, 2019

Thanks @Tuncay Senturk!

I performed full reindexing before posting but nothing changed.

I've checked all workflow transitions, it seems OK.

Integrity checker has completed with a full green.

I'll try to delete index files before reindeing as @Ignacio Pulgar suggests. I'll be back reporting about this

Best regards!

Tuncay Senturk
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 26, 2019

Do you see the same behaviour for other issues?

Leirbag Assuab November 27, 2019

Yes! It seems generalized. JQL query returns about 50 rows. I've calculated they should be 100 or more.

I was suspecting about a JSU post-function, "update any field," where I update "assignee" to "%current_user%" just under certain issue fields conditions (this is because I can't use standard "change assignee to current user", I need a JSU pre-condition).

But I've seen issues returned by JQL where JSU post-function has been executed.

I don't see any common pattern in all issues not returned by JQL. It's really weird issue...

Ignacio Pulgar
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 28, 2019

May you check if the JSU post function is positioned after the reindex post-function? (it should be before instead)

Like Leirbag Assuab likes this
Leirbag Assuab December 2, 2019

Thanks @Ignacio Pulgar! JSU post function has always been positioned after the reindex post-function. I wasn't very careful with such details while developing the workflows.

In the other hand, I've applied your first suggestion in our test environment. It seems that JQL result set is correct now. I'm waiting for system admins to apply your solution to production environment. I hope I could be back again reporting about this issue in a few days.

Like Ignacio Pulgar likes this
Partibha Rani December 2, 2019

Hi Leirbag Assuab,

Placement of the post-function is really tricky and important. We recommend to place your post-function after the "Creates the issue originally" but before the "Re-index an issue to keep indexes in sync with the database." post function except on create transition. Please have a look on the documentation https://confluence-apps.beecom.ch/display/JSU/Update+any+Issue+Field+Post-Function

You can always contact on support https://servicedesk-apps.beecom.ch/servicedesk/customer/portal/3

Like Leirbag Assuab likes this
Leirbag Assuab December 2, 2019

Thanks @Partibha Rani ! I've fixed WF to fit yours (and @Ignacio Pulgar's) suggestions.

Like # people like this

Suggest an answer

Log in or Sign up to answer