Modify

Opened 15 years ago

Closed 12 years ago

Last modified 12 years ago

#6872 closed defect (fixed)

Cannot get multiple chains to work.

Reported by: abhishek.bhaduri@… Owned by: Richard Liao
Priority: normal Component: TracTicketChainedFieldsPlugin
Severity: normal Keywords:
Cc: Ryan J Ollos, anonymous 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 (0)

Change History (19)

comment:1 Changed 15 years ago by Richard Liao

Status: newassigned

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

comment:2 Changed 15 years ago by abhishek.bhaduri@…

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

comment:3 Changed 14 years ago by anonymous

I will look forward to this feature as well!

comment:4 Changed 14 years ago by anonymous

Cc: sue.sml2006@… added; anonymous removed

comment:5 Changed 14 years ago by Ryan J Ollos

Cc: Ryan J Ollos added

comment:6 Changed 14 years ago by Richard Liao

Resolution: fixed
Status: assignedclosed

(In [8360]) Fixed #6872

comment:7 Changed 14 years ago by sue.sml2006@…

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

comment:8 Changed 14 years ago by abhishek.bhaduri@…

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

comment:9 Changed 12 years ago by phooper0001@…

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

comment:10 Changed 12 years ago by anonymous

Cc: phooper0001@… added

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

comment:11 in reply to:  10 Changed 12 years ago by Richard Liao

Replying to anonymous:

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

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

comment:12 Changed 12 years ago by anonymous

Cc: abhishek.bhaduri@… added

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

comment:13 in reply to:  12 Changed 12 years ago by Richard Liao

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

comment:14 Changed 12 years ago by anonymous

Resolution: fixed
Status: closedreopened

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 !!!!

comment:15 Changed 12 years ago by Richard Liao

Resolution: fixed
Status: reopenedclosed

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

comment:16 Changed 12 years ago by anonymous

Resolution: fixed
Status: closedreopened

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

comment:17 Changed 12 years ago by anonymous

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

comment:18 Changed 12 years ago by Richard Liao

Resolution: fixed
Status: reopenedclosed

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

comment:19 Changed 12 years ago by anonymous

Cc: anonymous added; sue.sml2006@… phooper0001@… abhishek.bhaduri@… removed

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

Paul

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Richard Liao.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.