I'd like to set the 'Confidential' flag to true as default for a specific component in my Trac system. How can I do this?
I've tried with the [ticket_custom] section in trac.ini, but I can set the 'Confidential' value as default only for all the components. This is not what I want.
Also I was thinking of creating a MySQL query to update all the tickets of my component by hand, and set the sensitive value to 1 for the 'Confidential' field. But this is not a clean approach, though.
Thanks!
The DynamicFieldsPlugin supports your use case as of version 1.2.6 (see [14240]). You'll need to install from the 0.11 (not 0.12) branch.
Here is an example:
[ticket-custom]
sensitive = checkbox
sensitive.set_to_true_when_component = component2 (overwrite)
The checkbox will be toggled to the checked state when component2 is selected.
Related
I am trying make a conditional select-box. There are 2 select-boxes. When select-box1 1's value changes then the 2nd select-box value automatically need to get selected to a value and it will also be disabled.
So far , i am able to do the conditional select where select-box 1's option changes value in select-box2 but it shows error in vue.
Error is--
[Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop's value. Prop being mutated: "value"
Also , i can disable the 2nd select-box but when i use dynamic disabled the value doesn't get set.
Question in brief:
1st selectbox has value-- a)one time payment & b)subscription and
2nd selectbox has value--a)held & b) Immediate.
Now, if 1st selectbox's subscription is selected then in the 2nd selectbox, it should be set to immediate and also get disabled.
Below is the Code Sandbox link--
https://codesandbox.io/s/conditional-select-forked-h61po?file=/src/components/HelloWorld.vue
If there is a better way of achieving this, then feel free to share ...
You don't need a ref, you can change the value of selected2 directly because it's not a prop, but a data field. Remove the reference in your component, like so:
<b-form-select
v-model="selected2"
:options="options2"
:disabled="isDisabled"
></b-form-select>
and change your onChange method to this (you don't need the else block as well):
onChange(event) {
if (event === "subscription") {
this.selected2 = "Immediate";
this.isDisabled = true;
}
},
Try it. I've tested it and it works.
I think the best way is to watch the 2-way-binding (selected) with a watcher.
See: https://v3.vuejs.org/guide/reactivity-computed-watchers.html#watch
And if the value changes you can check if the new value is 'subscription'.
And to select the wante option in the 2nd select you just have to asign the wanted value to the 2-way-binding (selected2). And for disabling set isDisabled to true.
This question is for this component: https://ant.design/components/carousel/#header
I have attempted autoplayInterval={1000} to no success.
autoPlaySpeed is the prop that you want. You can set autoPlaySpeed={1000}, default value is 3000ms. The carousel component demo uses 'react-slick' and here is the reference for autoPlaySpeed, you can also check rest of additional API's for this plugin. Check this code snippet.
I am trying to figure out from couple of days how to display label for filters on category page. As mentioned in document I have added attribute inside config.products.defaultFilters[] and the filter have started showing there.
I have color and brand filters. For color filters I have mapped color id to color name in config.products.colorMappings so it is displaying correctly there. But for brand I can do the same but it is a static solution so every time admin adds new brand I will need to add its mapping and build the storefront again.
I have tried to check their forum but nothing useful. I checked Vue Storefront vuex catalog and category-next stores for hint but cannot find anything related there.
The label for option under brand_filter should be readable but it is showing that brand attribute option's id
Ok, after spending couple of days finding solution to this problem, I finally got a hint from this answer.
I am using theme vsf-capybara, and according to its guide, to setup I generated a local.json from generate-local-config.js and I merged configuration manually from that local.json to config/local.json file. Prior to this there was no filter named brand or color added already to the main config file.
The config property responsible for the filter labels to be incorrect was entities.attribute.loadByAttributeMetadata and it was set to true I changed it to false because core/module/catalog/CatalogModule has one action attribute/list needs to be dispatched for application use. So if entities.attribute.loadByAttributeMetadata in config/local.json is set to true, this action will not be dispatched. Here is the excerpt from CatalogModule:
if (!config.entities.attribute.loadByAttributeMetadata) {
await store.dispatch('attribute/list', { // loading attributes for application use
filterValues: uniq([...config.products.defaultFilters, ...config.entities.productListWithChildren.includeFields])
})
}
https://codepen.io/bohdanafanasyev/pen/ZgqPWv?editors=1010
Above is the example of the issue I am facing now with the following logic:
1. Load records from firebase
2. Populate state with them
3. Render component that displays state
At this point, all work as expected.
4, Add a new product to the firebase
4.1 On success add product to the state
In a console, we can see that commit has added the product, but the component itself doesn't pick up the change.
Can somebody please suggest what is missing in the logic above.
P.S: I will also appreciate if someone could leave their opinion on a better way to restore the namespaced module state rather then.
Object.assign(state, newState)
Two changes here to make the cart reactive:
Declare cart property in cart/state, so that in your store you have state: {cart: {}};
In your addProduct mutation, change state.cart[productName] = "" to
Vue.set(state.cart, productName, "").
The takeaway is
always declare the property to make it reactive;
if you can't declare the property before hand, use Vue.set to add the property;
For more on reactivity.
i am using dropdown widget in dojo (dijit), i want to set the selected option the top menu
i tried this code:
dijit.byId('projectId').addOption({ label: item.projname , value: item.projid, selected:true });
here the selected: true
is not working
Thanks
The asker's code is not correct as the selected property applies for the construction of the object. As PaulR suggested, the asker should use dijit.byId('projectId').set("value",item.projid); when the select widget has already been created.
Aside: I would suggest using the AMD module "dijit/registry" rather than the root dijit object.
According to the documentation, "selected: true" is the correct way to specify the selected item. See https://dojotoolkit.org/reference-guide/1.9/dijit/form/Select.html.
I noticed the same issue in the past, and noticed that this only works correctly when an option has a value. So, can you check if "item.projid" contains a value?