Skip to content
This repository has been archived by the owner on Mar 11, 2021. It is now read-only.

Search by parent id / number support for query expression #2244

Open
sanbornsen opened this issue Aug 17, 2018 · 6 comments
Open

Search by parent id / number support for query expression #2244

sanbornsen opened this issue Aug 17, 2018 · 6 comments

Comments

@sanbornsen
Copy link

sanbornsen commented Aug 17, 2018

Expected behavior

  • If I add {'parent.id': { '$EQ': '00000-0000-0000-000000'}} or {'parent.number': { '$EQ': '132'}} then the query should give me all the child items of these items.

Actual behavior

  • Currently this feature is not there

See also https://openshift.io/openshiftio/Openshift_io/plan/detail/450

@kwk
Copy link
Collaborator

kwk commented Aug 17, 2018

I can understand what you want but parent.id irritates me. What is parent.name for example? That doesn't exist.

@sanbornsen
Copy link
Author

parent.name is the title right? That can be redundant.

@kwk
Copy link
Collaborator

kwk commented Aug 17, 2018

@sanbornsen yes, we can do this and it will be handled similar to type groups internally because the way n:m relationships are handled there.

@kwk
Copy link
Collaborator

kwk commented Aug 21, 2018

If I add {'parent.id': { '$EQ': '00000-0000-0000-000000'}} or {'parent.number': { '$EQ': '132'}} then the query should give me all the child items of these items.

@sanbornsen it makes a big difference if you want to search for the ID or the number actually. Do we need both?

@sanbornsen
Copy link
Author

sanbornsen commented Aug 21, 2018

@kwk just {'parent.number': { '$EQ': '132'}} this much should be good

id looks ugly

@kwk
Copy link
Collaborator

kwk commented Aug 22, 2018

Actually it doesn't matter we can support both.

@kwk kwk mentioned this issue Sep 5, 2018
kwk added a commit that referenced this issue Sep 6, 2018
Allow to search for work items by `parent.id` and `parent.number`.

See https://openshift.io/openshiftio/Openshift_io/plan/detail/450.
See #2244.
kwk added a commit to openshiftio/saas-openshiftio that referenced this issue Sep 6, 2018
# About
This description was generated using this script:
```sh
#!/bin/bash
set -e
GHORG=${GHORG:-fabric8-services}
GHREPO=${GHREPO:-fabric8-wit}
cat <<EOF
# About
This description was generated using this script:
\`\`\`sh
`cat $0`
\`\`\`
Invoked as:

    `echo GHORG=${GHORG} GHREPO=${GHREPO} $(basename $0) ${@:1}`

# Changes
EOF
git log \
  --pretty="%n**Commit:** https://github.com/${GHORG}/${GHREPO}/commit/%H%n**Author:** %an (%ae)%n**Date:** %aI%n%n%s%n%n%b%n%n----%n" \
  --reverse ${@:1} \
  | sed -E "s/([\s|\(| ])#([0-9]+)/\1${GHORG}\/${GHREPO}#\2/g"
```
Invoked as:

    GHORG=fabric8-services GHREPO=fabric8-wit git-log-pr.sh 677410943faa4c4d403f15f9639a8a15b4c19be9..upstream/master

# Changes

**Commit:** fabric8-services/fabric8-wit@c0eaf33
**Author:** Konrad Kleine ([email protected])
**Date:** 2018-09-05T12:47:43+02:00

Fieldtype.ConvertToModelWithType (fabric8-services/fabric8-wit#2274)

# TL;DR

When changing the type of a work item we have to check if fields are compatible. This logic was deeply embedded in the work item repository but it can be outsourced and made available to other pieces of the code as well.

# About

`ConvertToModelWithType` tries to find way to convert the value `v` from the current `FieldType` to the other `FieldType` in model representation; returns `error` otherwise.

# Examples

* For example if the given value `v` is a `string` and the other `FieldType` is a string list, we will return the value `v` as an array of `interface{}` objects. 
* Let's say the current `FieldType` is a string list and the other `FieldType` is a single `string` field, then we check if the value `v` has only one element and return that instead of the whole list.

----


**Commit:** fabric8-services/fabric8-wit@4909a90
**Author:** Konrad Kleine ([email protected])
**Date:** 2018-09-06T13:17:10+02:00

Search by parent (fabric8-services/fabric8-wit#2275)

Allow to search for work items by `parent.id` and `parent.number`.

See https://openshift.io/openshiftio/Openshift_io/plan/detail/450.
See fabric8-services/fabric8-wit#2244.


----
kwk added a commit to openshiftio/saas-openshiftio that referenced this issue Sep 6, 2018
**Commit:** fabric8-services/fabric8-wit@c0eaf33
**Author:** Konrad Kleine ([email protected])
**Date:** 2018-09-05T12:47:43+02:00

Fieldtype.ConvertToModelWithType (fabric8-services/fabric8-wit#2274)

# TL;DR

When changing the type of a work item we have to check if fields are compatible. This logic was deeply embedded in the work item repository but it can be outsourced and made available to other pieces of the code as well.

# About

`ConvertToModelWithType` tries to find way to convert the value `v` from the current `FieldType` to the other `FieldType` in model representation; returns `error` otherwise.

# Examples

* For example if the given value `v` is a `string` and the other `FieldType` is a string list, we will return the value `v` as an array of `interface{}` objects. 
* Let's say the current `FieldType` is a string list and the other `FieldType` is a single `string` field, then we check if the value `v` has only one element and return that instead of the whole list.

----

**Commit:** fabric8-services/fabric8-wit@4909a90
**Author:** Konrad Kleine ([email protected])
**Date:** 2018-09-06T13:17:10+02:00

Search by parent (fabric8-services/fabric8-wit#2275)

Allow to search for work items by `parent.id` and `parent.number`.

See https://openshift.io/openshiftio/Openshift_io/plan/detail/450.
See fabric8-services/fabric8-wit#2244.

----
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants