I have the following use case:
- I have two company-managed projects, let's call them `AA` and `BB`
- Let's suppose that the project `BB` has a custom field called `Total sum`.
- Let's suppose that some of the issues from the `AA` project are linked with some issues from the `BB` project.
I would like to build the following JQL:
Find all issues in the project AA that are linked with issues BB and sort these issues from AA in the descending/ascending order of the "Total sum" field from the BB project. If there are multiple links to one issue from AA then take the highest value of the "Total sum" field from the links.
Example:
- Links:
- Issue AA-2 is linked with BB-5 and BB-6
- Issue AA-4 is linked with BB-4
- Issue AA-8 is linked with BB-5 and BB-7
- "Total sum" values:
- BB-4 -> 25
- BB-5 -> 20
- BB-6 -> 38
- BB-7 -> 31
- Suppose I want to list AA issues in the descending order. So the expected result of the search query should be issues from AA in the following order:
- AA-2
- AA-8
- AA-4
P.S. If it is achievable through some extensions/plugins apart from leveraging the Jira's API manually to build the sorting mechanism, feel free to recommend such extensions.