Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to globally set custom bc_num_hours item #4132

Open
smoors opened this issue Feb 10, 2025 · 6 comments
Open

how to globally set custom bc_num_hours item #4132

smoors opened this issue Feb 10, 2025 · 6 comments

Comments

@smoors
Copy link

smoors commented Feb 10, 2025

i'm testing the global form item documented at https://osc.github.io/ood-documentation/latest/how-tos/app-development/interactive/form.html#global-batch-connect-form-items

i've set the following items in global_bc_items.yml:

  global_num_cores:
    widget: "number_field"
    label: "Number of cores"
    value: 1
    required: true
    min: 1
    max: 64
    step: 1
  global_bc_num_hours:
    label: "Number of hours"
    widget: "number_field"
    value: 12
    min: 1
    max: 120
    step: 1

for num_cores everything works as intended after replacing every num_cores string with global_num_cores.

however, for the built-in bc_num_hours item, i cannot replace the strings because they are of course built in. prefixing with global_ seems to have the effect that it is no longer a built-in item, and thus the customizations are ignored.

how can this be fixed?

@osc-bot osc-bot added this to the Backlog milestone Feb 10, 2025
@johrstrom
Copy link
Contributor

this looks like a bug, or am i doing it wrong?

I'll have to look into it. I'm not 100% sure how the code would react to both global and bc_ type parameters.

@smoors
Copy link
Author

smoors commented Feb 11, 2025

i just checked this again, and suddenly the label is correctly displayed, so this was probably a browser caching issue.

i'll close the ticket.

@smoors smoors closed this as completed Feb 11, 2025
@johrstrom
Copy link
Contributor

Thanks for the update!

@johrstrom
Copy link
Contributor

I'm guessing from discourse post that this persists?

@johrstrom johrstrom reopened this Feb 13, 2025
@smoors
Copy link
Author

smoors commented Feb 14, 2025

it's now a different issue, i've updated the first comment to clarify

@smoors smoors changed the title wrong label for global form item how to globally set custom bc_num_hours item Feb 14, 2025
@johrstrom johrstrom modified the milestones: 4.0, 4.1 Feb 14, 2025
@johrstrom
Copy link
Contributor

however, for the built-in bc_num_hours item, i cannot replace the strings because they are of course built in. prefixing with global_ seems to have the effect that it is no longer a built-in item, and thus the customizations are ignored.

Thanks. I think this is an additional feature to combine these 2.

how can this be fixed?

At a cursory glance, not easily. The factory determines which class to build and all the logic for global stuff is in the global attribute class, not the bc_num_hours class. So it's not clear off hand how to solve this.

@github-project-automation github-project-automation bot moved this to Bucket of Ideas in 4.1 Categorization Feb 26, 2025
@moffatsadeghi moffatsadeghi moved this from Bucket of Ideas to High Priority Issues in 4.1 Categorization Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: High Priority / Importance
Development

No branches or pull requests

4 participants