Uploaded image for project: 'nFeed'
  1. NFEED-2486

Creating issue with auto select is not refreshing the other fields

    Details

    • Type: Bug
    • Status: Closed (View workflow)
    • Priority: Major
    • Resolution: Answered
    • Affects Version/s: 5.11.2
    • Fix Version/s: 5.11.4
    • Labels:
      None
    • Environment:
      JIRA 7.4.4
      NFeed 5.11.2
      chrome browser
    • Type Of Support:
      Maintenance

      Description

      We have 2 fields , Customer and Product.

      The Product is depend on the Customer field.

      here is the Product sql

      WITH product_count
      AS
      (
      	SELECT	c.company_id,
      			(	SELECT	COUNT(1) products
      				FROM	overlord_people.company_product cp
      				WHERE	cp.company_id = c.company_id
      			) count_products
      	FROM	overlord_people.company c
      	WHERE	c.company_id = $issue.get("Customer")
      )
      SELECT	p.product_name,
              p.product_id
      FROM	overlord_cm.product p
      CROSS JOIN	product_count pc
      WHERE	p.archived = 0
      	AND (p.product_id IN (SELECT product_id from overlord_people.company_product cp WHERE cp.company_id = pc.company_id)
      		OR	pc.count_products = 0
      		)
      ORDER BY p.product_name
      

      Here is the Customer sql:

      WITH
      user_id
      AS
      (
      SELECT	u.id
      FROM	cwd_user u
      WHERE	u.user_name = '$currentUser'
      ),
      administrator
      AS
      (
      SELECT	adm.id
      FROM	cwd_membership adm
      WHERE	adm.child_id = (	SELECT	id
      							FROM	user_id
      						)
      	AND	adm.membership_type	= 'GROUP_USER'
      	AND	adm.parent_id = 10000
      ),
      customer
      AS
      (
      SELECT	adm.parent_name
      FROM	cwd_membership adm
      WHERE	adm.child_id = (	SELECT	id
      							FROM	user_id
      						)
      	AND	adm.membership_type	= 'GROUP_USER'
      	AND	adm.parent_name BETWEEN '0' AND '99999'
      )
      SELECT	cst.company_name,
      		cst.company_id
      FROM	dual
      LEFT OUTER JOIN administrator a ON (1=1)
      LEFT OUTER JOIN customer c ON (1=1)
      LEFT OUTER JOIN overlord_people.company cst ON (1=1)
      WHERE	(cst.company_type_id = 2 OR cst.company_id = 1)
      	AND	(		cst.company_id = TO_NUMBER(c.parent_name)
      			OR	a.id IS NOT NULL
      		)
      ORDER BY cst.company_name		
      

      When i Press the create and there is a unique value for the Customer field the product list is empty , the only way to get the products is select the empty value and select the customer again.

        Attachments

          Issue links

            Activity

              People

              • Assignee:
                nicolas.simon@valiantys.com Nicolas Simon
                Reporter:
                gilb Gil Brown
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: