Ticket #6872 (closed defect: fixed)

Opened 3 years ago

Last modified 3 months ago

Cannot get multiple chains to work.

Reported by: abhishek.bhaduri@gmail.com Assigned to: richard
Priority: normal Component: TracTicketChainedFieldsPlugin
Severity: normal Keywords:
Cc: rjollos, Trac Release: 0.11

Description

I am trying to implement three sets of chained fields. fieldA->A_1->A_2 fieldA->C_1->C_2 fieldA->C_1->C_2 In addtion, in one of the chains I have one filed setting options for two independent fields. The JSON is correct but doing so does not work out well. I get only a one subset out of the three chains working. The others are empty drop down boxes. Is this a limitation of the plugin? Or a bug? Can this be fixed/implemented in this plugin?

Attachments

Change History

03/25/10 03:38:28 changed by richard

  • status changed from new to assigned.

You are right, this plugin can support only one field chain currently. And multi chain support will be added in the next version.

03/25/10 13:28:39 changed by abhishek.bhaduri@gmail.com

Good deal. I will look forward to the next version. I appreciate it. Abhi.

08/12/10 19:13:55 changed by anonymous

I will look forward to this feature as well!

08/12/10 19:14:07 changed by anonymous

  • cc set to sue.sml2006@gmail.com.

08/12/10 22:31:28 changed by rjollos

  • cc changed from sue.sml2006@gmail.com to sue.sml2006@gmail.com, rjollos.

08/13/10 08:49:02 changed by richard

  • status changed from assigned to closed.
  • resolution set to fixed.

(In [8360]) Fixed #6872

08/13/10 17:28:41 changed by sue.sml2006@gmail.com

Thank you Richard, I've installed it and it's working great! Sue

08/13/10 18:03:24 changed by abhishek.bhaduri@gmail.com

Aawesome! Thanks Richard. I will use it when its time make next set if changes to my website.

01/29/13 17:34:57 changed by phooper0001@yahoo.com

Do you have an example of the multiple chining JSON please ?

(follow-up: ↓ 11 ) 02/04/13 11:38:15 changed by anonymous

  • cc changed from sue.sml2006@gmail.com, rjollos to sue.sml2006@gmail.com, rjollos, phooper0001@yahoo.com.

Do you have an example of the multiple chaining JSON please ?

(in reply to: ↑ 10 ) 02/05/13 02:48:31 changed by richard

Replying to anonymous:

Do you have an example of the multiple chaining JSON please ?

There is an example of multiple independent chains in #7767.

(follow-up: ↓ 13 ) 02/05/13 11:47:09 changed by anonymous

  • cc changed from sue.sml2006@gmail.com, rjollos, phooper0001@yahoo.com to sue.sml2006@gmail.com, rjollos, phooper0001@yahoo.com, abhishek.bhaduri@gmail.com.

Hi,

I've seen this thanks and I've replicated into my environment and the JSON compiles beautifully, however I'm stuck on the trac.ini config :

This works for a single chain, [tcf] chained_fields = tcf_browser_vendor, tcf_browser, tcf_browser_version hide_empty_fields = false

but how do I extend it for the second chain ?

example :

[tcf] chained_fields = tcf_browser_vendor, tcf_browser, tcf_browser_version chained_fields = tcf_device_category, tcf_device, tcf_os hide_empty_fields = false

doesn't work !

Many thanks for your time in this

Paul

(in reply to: ↑ 12 ) 02/05/13 11:53:56 changed by richard

Replying to anonymous:

chained_fields is only used to specify what fields are handled as chained, so, you only need to write them as following:

[tcf]
chained_fields = tcf_browser_vendor, tcf_browser, tcf_browser_version, tcf_device_category, tcf_device, tcf_os

02/05/13 12:07:46 changed by anonymous

  • status changed from closed to reopened.
  • resolution deleted.

I did play with this previously. All compiles well, but only one set of chained fields gets populated.

More details to try to give a clearer picture :

trac.ini

[tcf]

# Set up chaining 
chained_fields = tcf_browser_vendor, tcf_browser, tcf_browser_version, tcf_device_category, tcf_device, tcf_os
hide_empty_fields = false

# Create fields 
tcf_device = text
tcf_device.label = Device Name
tcf_device.order = 6
tcf_device.show_when_type = DEFECT

tcf_device_category = text
tcf_device_category.label = Device Category
tcf_device_category.order = 7
tcf_device_category.show_when_type = DEFECT

tcf_os = text
tcf_os.label = Device Operating System
tcf_os.order = 8
tcf_os.show_when_type = DEFECT

tcf_browser = text
tcf_browser.label = Browser Name
tcf_browser.order = 9
tcf_browser.show_when_type = DEFECT

tcf_browser_vendor = text
tcf_browser_vendor.label = Browser Vendor
tcf_browser_vendor.order = 10
tcf_browser_vendor.show_when_type = DEFECT

tcf_browser_version = text
tcf_browser_version.label = Browser Version
tcf_browser_version.order = 11
tcf_browser_version.show_when_type = DEFECT
JSON 
{
    "tcf_device_category": {
        "Mobile Handset": {
            "tcf_device":{
                "HTC ONE": {
                    "tcf_os":{
                        "Android 4.0.3": {}
                   }
                 },
                 "Phone 4": {
                    "tcf_os":{
                        "IOS 4.3.3": {}
                   }
                 },
                 "Phone 4S": {
                    "tcf_os":{
                        "IOS 5.1.1": {}
                   }
                 }
           }
        },
        "Tablet": {
            "tcf_device":{
                "Samsung Galaxy Tab 8.9 GT-P7300": {
                    "tcf_os":{
                        "Android 3.1": {}
                    }
                },
                "iPad 2": {
                    "tcf_os":{
                        "IOS 5.0.1": {}
                    }
                }
            }
        }
    },
     "tcf_browser_vendor": {
        "Mozilla": {
            "tcf_browser":{
                "Firefox": {
                    "tcf_browser_version":{
                        "15": {},
                        "16": {}
                   }
                 }
           }
        },
        "Microsoft": {
            "tcf_browser":{
                "Internet Explorer": {
                    "tcf_browser_version":{
                        "6": {},
                        "7": {},
                        "8": {},
                        "9": {}
                    }
                }
            }
        },
        "Google": {
            "tcf_browser":{
                "Chrome": {
                    "tcf_browser_version":{
                        "10": {},
                        "11": {},
                        "12": {}
                    }
                }
            }
        }
    }
   
}

Result :

The *browser* fields are populated with the defined values, but the *device* fields are not. They are created correctly as select fields, but with no data.

Sorry for the long winded reply, but I'm struggling with this and you seem to know what you're doing. You're the only person I've found that does !!!!

02/06/13 04:48:02 changed by richard

  • status changed from reopened to closed.
  • resolution set to fixed.

(In [12593]) Fixed #6872, support multiple sets of chained fields

02/06/13 11:00:15 changed by anonymous

  • status changed from closed to reopened.
  • resolution deleted.

You're a legend - many many many thanks. All works perfectly apart from this field ("tcf_os") not being displayed. I know the JSON is correct as it compiles AND if I remove the second chaining all fields are populated correctly. It's just when I add the multiple chains, only 5 out of the 6 fields are populated. I understand you're doing me a favour here but if you do have any further thoughts, it'd be much appreciated

Thanks again,

Paul

02/06/13 11:01:11 changed by anonymous

actually, for clarity, the "tcf_os" field IS displayed, but NOT populated.

02/07/13 07:56:40 changed by richard

  • status changed from reopened to closed.
  • resolution set to fixed.

(In [12602]) Fixed #6872, support multiple sets of chained fields

02/08/13 11:18:01 changed by anonymous

  • cc changed from sue.sml2006@gmail.com, rjollos, phooper0001@yahoo.com, abhishek.bhaduri@gmail.com to rjollos, .

Mate, you are an absolute gem - thank you SO much for this. Have a top weekend.

Paul


Add/Change #6872 (Cannot get multiple chains to work.)




Change Properties
Action